return NULL;
}
- fpipe = popen("gzip -q -d -f --stdout", "rb");
+ fpipe = popen("gzip -q -d -f --stdout", "r");
if (fpipe == NULL) perror("uncompress_pipe");
close(0);
if (dup(save_fd) < 0) {
return NULL;
}
- fpipe = popen("gzip -q -1 -c", "wb");
+ fpipe = popen("gzip -q -1 -c", "w");
if (fpipe == NULL) perror("compress_pipe");
close(1);
if (dup(save_fd) < 0) {
fpipe = NULL;
nbytes = xdim*ydim;
(void)sprintf(pipecmd, "ppmtogif > %s 2>/dev/null", outfile);
- fpipe = popen(pipecmd, "wb"); /* Global FILE * */
+ fpipe = popen(pipecmd, "w"); /* Global FILE * */
if (fpipe == NULL) {
perror("RSL_write_gif1");
return;
}
nbytes = xdim*ydim;
(void)sprintf(pipecmd, "ppmtopict > %s 2>/dev/null", outfile);
- fpipe = popen(pipecmd, "wb"); /* Global FILE * */
+ fpipe = popen(pipecmd, "w"); /* Global FILE * */
fprintf(fpipe, "P6\n# %s\n%d %d\n255\n",outfile, xdim, ydim);
for (i=0; i<nbytes; i++)
if (fwrite(c_table[image[i]], sizeof(char), 3, fpipe) != 3)
}
nbytes = xdim*ydim;
(void)sprintf(pipecmd, "gzip > %s.gz 2>/dev/null", outfile);
- fpipe = popen(pipecmd, "wb"); /* Global FILE * */
+ fpipe = popen(pipecmd, "w"); /* Global FILE * */
fprintf(fpipe, "P5\n# %s\n%d %d\n255\n",outfile, xdim, ydim);
if (fwrite(image, sizeof(char), nbytes, fpipe) != nbytes)
fprintf(stderr, "RSL_write_pgm: short write\n");