--- OLD/pbm/libpbm1.c Thu Jan 1 00:00:00 1970 +++ NEW/pbm/libpbm1.c Thu Jan 1 00:00:00 1970 @@ -19,7 +19,7 @@ #else /*__STDC__*/ #include #endif /*__STDC__*/ - +#include /* Variable-sized arrays. */ @@ -334,7 +334,6 @@ #ifndef A_STRERROR extern char* sys_errlist[]; #endif /* A_STRERROR */ - extern int errno; char* e; #ifdef A_STRERROR @@ -822,7 +821,7 @@ #ifdef VMS /* - * @(#)argproc.c 1.0 89/02/01 Mark Pizzolato (mark@infopiz.uucp) + * @(#)argproc.c 1.0 89/02/01 Mark Pizzolato (mark@infopiz.uucp) */ #ifndef lint @@ -1005,11 +1004,11 @@ out = pipe_and_fork(subcmd); outmode = "wb"; } - + /* Check for input from a pipe (mailbox) */ if(fstat(0, &statbuf) == 0){ - if(strncmp(statbuf.st_dev, "MB", 2) == 0 || + if(strncmp(statbuf.st_dev, "MB", 2) == 0 || strncmp(statbuf.st_dev, "_MB", 3) == 0){ /* Input from a pipe, reopen it in binary mode to disable */ @@ -1044,7 +1043,7 @@ { #else if ((out != NULL) && (NULL == freopen(out, outmode, stdout, "mbc=32", "mbf=2"))) - { + { #endif perror(ap); /* Error, can't write or append */ exit(EXIT_ERR); /* Is a fatal error */ @@ -1054,7 +1053,7 @@ /* * We are making an explicit output file, fstat the file and * declare exit handler to be able change the file to fixed length - * records if necessary. + * records if necessary. */ char fname[256]; static int outfile_rundown(), check_outfile_filetype(); @@ -1067,7 +1066,7 @@ stat_t *stat; /* arg 2 */ int exit_status; int skew[128]; - } exit_block = + } exit_block = { 0, outfile_rundown, 2, &exit_block.exit_status, &ofile_stat, 0 }; if ( fstat ( fileno(stdout), &ofile_stat ) == 0 ) @@ -1104,7 +1103,7 @@ for ( p = binary_filetypes; *p != '\0'; p++ ) { for ( t = p; - (*p != '\0' ) && (strchr ( ", ", *p ) == NULL); + (*p != '\0' ) && (strchr ( ", ", *p ) == NULL); p++ ) *p = toupper(*p); *p = '\0'; @@ -1143,7 +1142,7 @@ */ device.dsc$w_length = strlen ( statbuf->st_dev ); status = sys$assign ( &device, &channel, 0, 0 ); - if ((status & 1) == 0) { fprintf(stderr, + if ((status & 1) == 0) { fprintf(stderr, "assign error to %s (%d)\n", device.dsc$a_pointer, status); return status; } code = DVI$_DEVCHAR;