25 |
|
#define BRT (-1) /* special index for brightness */ |
26 |
|
|
27 |
|
struct { |
28 |
< |
char *name; /* file name */ |
28 |
> |
char *name; /* file or command name */ |
29 |
|
FILE *fp; /* stream pointer */ |
30 |
|
COLOR *scan[WINSIZ]; /* input scanline window */ |
31 |
|
COLOR coef; /* coefficient */ |
61 |
|
|
62 |
|
int wrongformat = 0; |
63 |
|
|
64 |
+ |
FILE *popen(); |
65 |
|
|
66 |
+ |
|
67 |
|
main(argc, argv) |
68 |
|
int argc; |
69 |
|
char *argv[]; |
126 |
|
} |
127 |
|
else { |
128 |
|
input[nfiles].name = argv[a]; |
129 |
< |
input[nfiles].fp = fopen(argv[a], "r"); |
129 |
> |
input[nfiles].fp = argv[a][0]=='!' ? |
130 |
> |
popen(argv[a]+1, "r") : |
131 |
> |
fopen(argv[a], "r"); |
132 |
|
if (input[nfiles].fp == NULL) { |
133 |
|
perror(argv[a]); |
134 |
|
quit(1); |