mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
allow - as input file
This commit is contained in:
parent
e2a1725dfc
commit
c39bd3556b
1 changed files with 4 additions and 1 deletions
|
@ -34,7 +34,10 @@ main(int argc, char **argv)
|
|||
exits("usage");
|
||||
}
|
||||
|
||||
fd = open(argv[1], OREAD);
|
||||
if(strcmp(argv[1], "-") == 0)
|
||||
fd = 1;
|
||||
else
|
||||
fd = open(argv[1], OREAD);
|
||||
if(fd < 0){
|
||||
fprint(2, "%s: can't open %s: %r\n", argv0, argv[1]);
|
||||
exits("open");
|
||||
|
|
Loading…
Reference in a new issue