# | Line 36 | Line 36 | char *argv[]; | |
---|---|---|
36 | if (argc > 1 && !strcmp(argv[1], "-d")) { | |
37 | argc--; argv++; | |
38 | dim = 1; | |
39 | + | } else if (argc == 2 && !strcmp(argv[1], "-")) { |
40 | + | getheader(stdin, NULL); |
41 | + | copycat(); |
42 | + | exit(0); |
43 | } | |
44 | for (i = 1; i < argc; i++) { | |
45 | fputs(argv[i], stdout); | |
# | Line 96 | Line 100 | register FILE *fp; | |
100 | fputs("unknown file type\n", stdout); | |
101 | break; | |
102 | } | |
103 | + | } |
104 | + | |
105 | + | |
106 | + | copycat() /* copy input to output */ |
107 | + | { |
108 | + | register int c; |
109 | + | |
110 | + | while ((c = getchar()) != EOF) |
111 | + | putchar(c); |
112 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |