74 |
|
sendframe(file) /* convert and send a frame */ |
75 |
|
char *file; |
76 |
|
{ |
77 |
< |
char command[128]; |
77 |
> |
char command[PATH_MAX]; |
78 |
|
COLR scanin[SCANLINE]; |
79 |
|
int xres, yres; |
80 |
|
int xbeg, ybeg; |
90 |
|
file = "<stdin>"; |
91 |
|
} else { |
92 |
|
if (pcom != NULL) { |
93 |
< |
sprintf(command, "( %s ) < %s", pcom, file); |
93 |
> |
sprintf(command, "( %s ) < \"%s\"", pcom, file); |
94 |
|
fp = popen(command, "r"); |
95 |
|
} else |
96 |
|
fp = fopen(file, "r"); |
100 |
|
exit(1); |
101 |
|
} |
102 |
|
/* get dimensions */ |
103 |
< |
getheader(fp, NULL); |
103 |
> |
getheader(fp, NULL, NULL); |
104 |
|
if (checkheader(fp, COLRFMT, NULL) < 0) { |
105 |
|
fputs(file, stderr); |
106 |
|
fputs(": not a Radiance picture\n", stderr); |