--- a/get/getx11/XGetHClrs.c +++ b/get/getx11/XGetHClrs.c @@ -1,5 +1,4 @@ #ifndef XLIBINT_H_NOT_AVAILABLE -#include /* $XConsortium: XGetHClrs.c,v 11.10 88/09/06 16:07:50 martin Exp $ */ /* Copyright Massachusetts Institute of Technology 1986 */ --- a/tools/mallocNd.c +++ b/tools/mallocNd.c @@ -67,7 +67,7 @@ /* Imports */ #include -extern char *malloc(); +#include /* Forward declarations */ char *BuildIndirectionTable(); --- a/tools/into.c +++ b/tools/into.c @@ -40,8 +40,8 @@ static char buf[MAXPATHLEN+1]; short forceflg; /* overwrite an unwritable file? */ -extern int errno; -extern char *sys_errlist[]; +#include +#include void main(argc, argv) @@ -103,7 +103,7 @@ if (ferror(outf)) { fprintf(stderr, "into: %s, \"%s\" not modified\n", - sys_errlist[errno], argv[1]); + strerror(errno), argv[1]); unlink(buf); exit(1); } --- a/cnv/tex/dvirle2.c +++ b/cnv/tex/dvirle2.c @@ -55,7 +55,6 @@ void DumpTopOfBand(), MoveDown(), WriteBuf(), WriteBlanks(); char *ProgName; -extern int errno; extern char *optarg; extern int optind; --- a/cnv/wasatchrle.c +++ b/cnv/wasatchrle.c @@ -32,7 +32,6 @@ #include #include "rle.h" -extern int errno; /* "short" in our world is 16 bits. Beware of swyte-bopping. */ --- a/get/getx11/x11_stuff.c +++ b/get/getx11/x11_stuff.c @@ -155,7 +155,6 @@ IPC_CREAT|0777 ); if ( img->shm_img.shmid < 0 ) { - extern int errno; if ( errno == ENOSPC ) { if ( !no_shared_space ) @@ -361,7 +360,6 @@ Boolean reallocate; XDestroyImage( image ); if ( img->shm_pix.shmid < 0 ) { - extern int errno; if ( errno == ENOSPC ) { if ( !no_shared_space ) --- a/get/qcr/qcr.h +++ b/get/qcr/qcr.h @@ -6,8 +6,6 @@ #define GREEN 1 #define BLUE 2 -extern int errno; - /* Command defs for QCR-Z Film Recorder */ /* These are for 8 bit Look Up Tables */ --- a/get/gettaac.c +++ b/get/gettaac.c @@ -24,6 +24,7 @@ * Send bug fixes and improvements to: ksp@maxwell.nde.swri.edu */ +#include #include #include #include @@ -459,7 +460,6 @@ char *template; char nonUnique; char twiddleUserCompletion; - extern int errno; struct direct *nameEntry; DIR *dirChan; struct passwd *pwdEntry; --- a/tools/clock/rleClock.c +++ b/tools/clock/rleClock.c @@ -598,7 +598,7 @@ { TRUE, "-tf", STRING, "Text area format string", (char *)&FormatString }, { FALSE, "-Xm", BOOL, "Output the alpha channel on RGB", (char *)&DebugAlpha }, { FALSE, "-D", BOOL, "Turn on debugging", (char *)&Debug }, - NULL + { FALSE, NULL } }; void --- a/tools/to8.c +++ b/tools/to8.c @@ -175,7 +175,7 @@ * Give it a background color of black, since the real background * will be dithered anyway. */ - if ( in_hdr.background != NULL ) + if ( in_hdr.background != 0 ) { out_hdr.bg_color = (int *)malloc( sizeof( int ) ); RLE_CHECK_ALLOC( cmd_name( argv ), out_hdr.bg_color, 0 ); --- a/cnv/rletoabA62/rletoabA62.c +++ b/cnv/rletoabA62/rletoabA62.c @@ -157,7 +157,7 @@ exit(1); } if (optind < argc) { - if ((file = open(argv[optind], 0)) == NULL) { + if ((file = open(argv[optind], 0)) == -1) { perror(argv[optind]); exit(1); }