From 46b902da5252697ebfccc29f3d5525122fbf1033 Mon Sep 17 00:00:00 2001 From: jtc Date: Tue, 6 Feb 1996 22:47:06 +0000 Subject: Removed "extern int errno"; Added #include if not already present. --- adventure/main.c | 5 ++--- caesar/caesar.c | 6 +++--- cribbage/instr.c | 7 +++---- dm/dm.c | 6 +++--- hack/hack.unix.c | 5 ++--- pom/pom.c | 6 +++--- tetris/input.c | 3 +-- 7 files changed, 17 insertions(+), 21 deletions(-) diff --git a/adventure/main.c b/adventure/main.c index 3879ba60..95f62668 100644 --- a/adventure/main.c +++ b/adventure/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.2 1995/03/21 12:05:07 cgd Exp $ */ +/* $NetBSD: main.c,v 1.3 1996/02/06 22:47:06 jtc Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -48,7 +48,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93"; #else -static char rcsid[] = "$NetBSD: main.c,v 1.2 1995/03/21 12:05:07 cgd Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.3 1996/02/06 22:47:06 jtc Exp $"; #endif #endif /* not lint */ @@ -63,7 +63,6 @@ main(argc,argv) int argc; char **argv; { - extern int errno; register int i; int rval,ll; struct text *kk; diff --git a/caesar/caesar.c b/caesar/caesar.c index de5a2e8a..2d4772e7 100644 --- a/caesar/caesar.c +++ b/caesar/caesar.c @@ -1,4 +1,4 @@ -/* $NetBSD: caesar.c,v 1.3 1995/03/21 15:08:21 cgd Exp $ */ +/* $NetBSD: caesar.c,v 1.4 1996/02/06 22:47:15 jtc Exp $ */ /* * Copyright (c) 1989, 1993 @@ -51,7 +51,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)caesar.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: caesar.c,v 1.3 1995/03/21 15:08:21 cgd Exp $"; +static char rcsid[] = "$NetBSD: caesar.c,v 1.4 1996/02/06 22:47:15 jtc Exp $"; #endif #endif /* not lint */ @@ -59,6 +59,7 @@ static char rcsid[] = "$NetBSD: caesar.c,v 1.3 1995/03/21 15:08:21 cgd Exp $"; #include #include #include +#include #define LINELENGTH 2048 #define ROTATE(ch, perm) \ @@ -79,7 +80,6 @@ main(argc, argv) int argc; char **argv; { - extern int errno; register int ch, dot, i, nread, winnerdot; register char *inbuf; int obs[26], try, winner; diff --git a/cribbage/instr.c b/cribbage/instr.c index b4ecda0d..c2ab997a 100644 --- a/cribbage/instr.c +++ b/cribbage/instr.c @@ -1,4 +1,4 @@ -/* $NetBSD: instr.c,v 1.3 1995/03/21 15:08:52 cgd Exp $ */ +/* $NetBSD: instr.c,v 1.4 1996/02/06 22:47:18 jtc Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,13 +37,12 @@ #if 0 static char sccsid[] = "@(#)instr.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: instr.c,v 1.3 1995/03/21 15:08:52 cgd Exp $"; +static char rcsid[] = "$NetBSD: instr.c,v 1.4 1996/02/06 22:47:18 jtc Exp $"; #endif #endif /* not lint */ #include #include -#include #include #include @@ -51,6 +50,7 @@ static char rcsid[] = "$NetBSD: instr.c,v 1.3 1995/03/21 15:08:52 cgd Exp $"; #include #include #include +#include #include "deck.h" #include "cribbage.h" @@ -59,7 +59,6 @@ static char rcsid[] = "$NetBSD: instr.c,v 1.3 1995/03/21 15:08:52 cgd Exp $"; void instructions() { - extern int errno; struct stat sb; union wait pstat; pid_t pid; diff --git a/dm/dm.c b/dm/dm.c index 7dd82ef9..fca2fd39 100644 --- a/dm/dm.c +++ b/dm/dm.c @@ -1,4 +1,4 @@ -/* $NetBSD: dm.c,v 1.4 1995/03/21 15:09:05 cgd Exp $ */ +/* $NetBSD: dm.c,v 1.5 1996/02/06 22:47:20 jtc Exp $ */ /* * Copyright (c) 1987, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)dm.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: dm.c,v 1.4 1995/03/21 15:09:05 cgd Exp $"; +static char rcsid[] = "$NetBSD: dm.c,v 1.5 1996/02/06 22:47:20 jtc Exp $"; #endif #endif /* not lint */ @@ -60,10 +60,10 @@ static char rcsid[] = "$NetBSD: dm.c,v 1.4 1995/03/21 15:09:05 cgd Exp $"; #include #include #include +#include #include "pathnames.h" -extern int errno; static time_t now; /* current time value */ static int priority = 0; /* priority game runs at */ static char *game, /* requested game */ diff --git a/hack/hack.unix.c b/hack/hack.unix.c index 86308446..10c0e660 100644 --- a/hack/hack.unix.c +++ b/hack/hack.unix.c @@ -3,7 +3,7 @@ */ #ifndef lint -static char rcsid[] = "$NetBSD: hack.unix.c,v 1.3 1995/03/23 08:31:55 cgd Exp $"; +static char rcsid[] = "$NetBSD: hack.unix.c,v 1.4 1996/02/06 22:47:25 jtc Exp $"; #endif /* not lint */ /* This file collects some Unix dependencies; hack.pager.c contains some more */ @@ -158,7 +158,6 @@ veryold(fd) { if(buf.st_size != sizeof(int)) return(0); /* not an xlock file */ (void) time(&date); if(date - buf.st_mtime < 3L*24L*60L*60L) { /* recent */ - extern int errno; int lockedpid; /* should be the same size as hackpid */ if(read(fd, (char *)&lockedpid, sizeof(lockedpid)) != @@ -184,7 +183,7 @@ veryold(fd) { getlock() { - extern int errno, hackpid, locknum; + extern int hackpid, locknum; register int i = 0, fd; (void) fflush(stdout); diff --git a/pom/pom.c b/pom/pom.c index 8a9f40f8..3ef68819 100644 --- a/pom/pom.c +++ b/pom/pom.c @@ -1,4 +1,4 @@ -/* $NetBSD: pom.c,v 1.5 1995/06/07 16:30:46 cgd Exp $ */ +/* $NetBSD: pom.c,v 1.6 1996/02/06 22:47:29 jtc Exp $ */ /* * Copyright (c) 1989, 1993 @@ -45,7 +45,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: pom.c,v 1.5 1995/06/07 16:30:46 cgd Exp $"; +static char rcsid[] = "$NetBSD: pom.c,v 1.6 1996/02/06 22:47:29 jtc Exp $"; #endif #endif /* not lint */ @@ -64,6 +64,7 @@ static char rcsid[] = "$NetBSD: pom.c,v 1.5 1995/06/07 16:30:46 cgd Exp $"; #include #include #include +#include #define PI 3.141592654 #define EPOCH 85 @@ -78,7 +79,6 @@ double dtor(), potm(), adj360(); main() { - extern int errno; struct timeval tp; struct timezone tzp; struct tm *GMT, *gmtime(); diff --git a/tetris/input.c b/tetris/input.c index abac0a93..26772cda 100644 --- a/tetris/input.c +++ b/tetris/input.c @@ -1,4 +1,4 @@ -/* $NetBSD: input.c,v 1.2 1995/04/22 07:42:34 cgd Exp $ */ +/* $NetBSD: input.c,v 1.3 1996/02/06 22:47:33 jtc Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -80,7 +80,6 @@ rwait(tvp) { int i; struct timeval starttv, endtv, *s; - extern int errno; #define NILTZ ((struct timezone *)0) /* -- cgit v1.2.3-56-ge451