diff options
author | wiz <wiz@NetBSD.org> | 2002-05-26 00:12:11 +0000 |
---|---|---|
committer | wiz <wiz@NetBSD.org> | 2002-05-26 00:12:11 +0000 |
commit | 4506ee6421a65ebf465cb3e1124f0ba604dbcb20 (patch) | |
tree | 652f0004246ba71f034e73ec6027e89bfcfb1132 | |
parent | 7562e03d5a67f7fca8205dbab0b115d63e08b0b7 (diff) | |
download | bsdgames-darwin-4506ee6421a65ebf465cb3e1124f0ba604dbcb20.tar.gz bsdgames-darwin-4506ee6421a65ebf465cb3e1124f0ba604dbcb20.tar.zst bsdgames-darwin-4506ee6421a65ebf465cb3e1124f0ba604dbcb20.zip |
__STDC__ is always defined on NetBSD.
-rw-r--r-- | cribbage/io.c | 31 | ||||
-rw-r--r-- | hack/extern.h | 8 | ||||
-rw-r--r-- | hack/hack.main.c | 15 | ||||
-rw-r--r-- | hack/hack.pri.c | 16 | ||||
-rw-r--r-- | hack/hack.topl.c | 16 | ||||
-rw-r--r-- | hack/hack.tty.c | 15 | ||||
-rw-r--r-- | hunt/huntd/terminal.c | 24 | ||||
-rw-r--r-- | larn/io.c | 20 | ||||
-rw-r--r-- | mille/misc.c | 20 |
9 files changed, 25 insertions, 140 deletions
diff --git a/cribbage/io.c b/cribbage/io.c index dc61c253..21075e21 100644 --- a/cribbage/io.c +++ b/cribbage/io.c @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.14 1999/09/30 18:01:32 jsm Exp $ */ +/* $NetBSD: io.c,v 1.15 2002/05/26 00:12:11 wiz Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -38,24 +38,19 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: io.c,v 1.14 1999/09/30 18:01:32 jsm Exp $"); +__RCSID("$NetBSD: io.c,v 1.15 2002/05/26 00:12:11 wiz Exp $"); #endif #endif /* not lint */ #include <ctype.h> #include <curses.h> #include <signal.h> +#include <stdarg.h> #include <stdlib.h> #include <string.h> #include <termios.h> #include <unistd.h> -#if __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif - #include "deck.h" #include "cribbage.h" #include "cribcur.h" @@ -392,21 +387,11 @@ int Mpos = 0; static int Newpos = 0; void -#if __STDC__ msg(const char *fmt, ...) -#else -msg(fmt, va_alist) - char *fmt; - va_dcl -#endif { va_list ap; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif (void)vsprintf(&Msgbuf[Newpos], fmt, ap); Newpos = strlen(Msgbuf); va_end(ap); @@ -418,21 +403,11 @@ msg(fmt, va_alist) * Add things to the current message */ void -#if __STDC__ addmsg(const char *fmt, ...) -#else -addmsg(fmt, va_alist) - char *fmt; - va_dcl -#endif { va_list ap; -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif (void)vsprintf(&Msgbuf[Newpos], fmt, ap); Newpos = strlen(Msgbuf); va_end(ap); diff --git a/hack/extern.h b/hack/extern.h index 325531b8..804498cc 100644 --- a/hack/extern.h +++ b/hack/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.4 2001/03/25 20:43:58 jsm Exp $ */ +/* $NetBSD: extern.h,v 1.5 2002/05/26 00:12:12 wiz Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -37,12 +37,8 @@ */ #ifndef _EXTERN_H_ #define _EXTERN_H_ -#include <stdio.h> -#ifndef __STDC__ -#include <varargs.h> -#else #include <stdarg.h> -#endif +#include <stdio.h> /* alloc.c */ long *alloc __P((unsigned)); diff --git a/hack/hack.main.c b/hack/hack.main.c index 6c0e7491..37696818 100644 --- a/hack/hack.main.c +++ b/hack/hack.main.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.main.c,v 1.6 2001/03/25 20:44:01 jsm Exp $ */ +/* $NetBSD: hack.main.c,v 1.7 2002/05/26 00:12:12 wiz Exp $ */ /* * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.main.c,v 1.6 2001/03/25 20:44:01 jsm Exp $"); +__RCSID("$NetBSD: hack.main.c,v 1.7 2002/05/26 00:12:12 wiz Exp $"); #endif /* not lint */ #include <signal.h> @@ -466,22 +466,11 @@ askname() /* VARARGS1 */ void -#ifdef __STDC__ impossible(const char *s, ...) -#else -impossible(va_alist) - va_dcl -#endif { va_list ap; -#ifndef __STDC__ - const char *s; - va_start(ap); - s = va_arg(ap, const char *); -#else va_start(ap, s); -#endif vpline(s, ap); va_end(ap); pline("Program in disorder - perhaps you'd better Quit."); diff --git a/hack/hack.pri.c b/hack/hack.pri.c index 826b2599..ea30cd57 100644 --- a/hack/hack.pri.c +++ b/hack/hack.pri.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.pri.c,v 1.6 2001/03/25 20:44:02 jsm Exp $ */ +/* $NetBSD: hack.pri.c,v 1.7 2002/05/26 00:12:12 wiz Exp $ */ /* * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.pri.c,v 1.6 2001/03/25 20:44:02 jsm Exp $"); +__RCSID("$NetBSD: hack.pri.c,v 1.7 2002/05/26 00:12:12 wiz Exp $"); #endif /* not lint */ #include "hack.h" @@ -40,21 +40,11 @@ swallowed() boolean panicking; void -#ifdef __STDC__ panic(const char *fmt, ...) -#else -panic(va_alist) - va_dcl -#endif { va_list ap; -#ifndef __STDC__ - const char *fmt; - va_start(ap); - fmt = va_arg(ap, const char *); -#else + va_start(ap, fmt); -#endif if (panicking++) exit(1); /* avoid loops - this should never happen */ home(); diff --git a/hack/hack.topl.c b/hack/hack.topl.c index 53a0bea0..ff32e307 100644 --- a/hack/hack.topl.c +++ b/hack/hack.topl.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.topl.c,v 1.5 2001/03/25 20:44:03 jsm Exp $ */ +/* $NetBSD: hack.topl.c,v 1.6 2002/05/26 00:12:12 wiz Exp $ */ /* * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.topl.c,v 1.5 2001/03/25 20:44:03 jsm Exp $"); +__RCSID("$NetBSD: hack.topl.c,v 1.6 2002/05/26 00:12:12 wiz Exp $"); #endif /* not lint */ #include <stdlib.h> @@ -143,21 +143,11 @@ clrlin() } void -#ifdef __STDC__ pline(const char *fmt, ...) -#else -pline(va_alist) - va_dcl -#endif { va_list ap; -#ifndef __STDC__ - const char *fmt; - va_start(ap); - fmt = va_arg(ap, const char *); -#else + va_start(ap, fmt); -#endif vpline(fmt, ap); va_end(ap); } diff --git a/hack/hack.tty.c b/hack/hack.tty.c index 93831ce1..15a17d4c 100644 --- a/hack/hack.tty.c +++ b/hack/hack.tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.tty.c,v 1.9 2001/03/25 20:44:03 jsm Exp $ */ +/* $NetBSD: hack.tty.c,v 1.10 2002/05/26 00:12:12 wiz Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)hack.tty.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: hack.tty.c,v 1.9 2001/03/25 20:44:03 jsm Exp $"); +__RCSID("$NetBSD: hack.tty.c,v 1.10 2002/05/26 00:12:12 wiz Exp $"); #endif #endif /* not lint */ @@ -143,22 +143,11 @@ setftty() /* fatal error */ /* VARARGS1 */ void -#ifdef __STDC__ error(const char *fmt, ...) -#else -error(va_alist) - va_dcl -#endif { va_list ap; -#ifndef __STDC__ - const char *fmt; - va_start(ap); - fmt = va_arg(ap, const char *); -#else va_start(ap, fmt); -#endif if (settty_needed) settty((char *) 0); vprintf(fmt, ap); diff --git a/hunt/huntd/terminal.c b/hunt/huntd/terminal.c index 94493531..fc98d0fa 100644 --- a/hunt/huntd/terminal.c +++ b/hunt/huntd/terminal.c @@ -1,4 +1,4 @@ -/* $NetBSD: terminal.c,v 1.2 1997/10/10 16:34:05 lukem Exp $ */ +/* $NetBSD: terminal.c,v 1.3 2002/05/26 00:12:13 wiz Exp $ */ /* * Hunt * Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold @@ -7,16 +7,12 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: terminal.c,v 1.2 1997/10/10 16:34:05 lukem Exp $"); +__RCSID("$NetBSD: terminal.c,v 1.3 2002/05/26 00:12:13 wiz Exp $"); #endif /* not lint */ -#if __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif -# include "hunt.h" -# define TERM_WIDTH 80 /* Assume terminals are 80-char wide */ +#include "hunt.h" +#define TERM_WIDTH 80 /* Assume terminals are 80-char wide */ /* * cgoto: @@ -110,22 +106,12 @@ ref(pp) * Send a command to the given user */ void -#if __STDC__ sendcom(PLAYER *pp, int command, ...) -#else -sendcom(pp, command, va_alist) - PLAYER *pp; - int command; - va_dcl -#endif { va_list ap; int arg1, arg2; -#if __STDC__ + va_start(ap, command); -#else - va_start(ap); -#endif (void) putc(command, pp->p_output); switch (command & 0377) { case MOVE: @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.13 2001/11/02 18:27:00 christos Exp $ */ +/* $NetBSD: io.c,v 1.14 2002/05/26 00:12:13 wiz Exp $ */ /* * io.c Larn is copyrighted 1986 by Noah Morgan. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: io.c,v 1.13 2001/11/02 18:27:00 christos Exp $"); +__RCSID("$NetBSD: io.c,v 1.14 2002/05/26 00:12:13 wiz Exp $"); #endif /* not lint */ #include "header.h" @@ -116,11 +116,7 @@ static char saveeof, saveeol; #endif /* not TERMIO or TERMIOS */ #ifndef NOVARARGS /* if we have varargs */ -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #else /* NOVARARGS */ /* if we don't have varargs */ typedef char *va_list; #define va_dcl int va_alist; @@ -249,26 +245,14 @@ sprintf(str) } #else /* lint */ /* VARARGS */ -#ifdef __STDC__ void lprintf(const char *fmt, ...) -#else -void -lprintf(va_alist) -va_dcl -#endif { va_list ap; /* pointer for variable argument list */ char *outb, *tmpb; long wide, left, cont, n; /* data for lprintf */ char db[12]; /* %d buffer in lprintf */ -#ifndef __STDC__ - char *fmt; - va_start(ap); /* initialize the var args pointer */ - fmt = va_arg(ap, char *); /* pointer to format string */ -#else va_start(ap, fmt); -#endif if (lpnt >= lpend) lflush(); outb = lpnt; diff --git a/mille/misc.c b/mille/misc.c index 48f25cb9..11e47eb9 100644 --- a/mille/misc.c +++ b/mille/misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.9 2000/04/27 00:33:49 jdc Exp $ */ +/* $NetBSD: misc.c,v 1.10 2002/05/26 00:12:13 wiz Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,18 +38,14 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: misc.c,v 1.9 2000/04/27 00:33:49 jdc Exp $"); +__RCSID("$NetBSD: misc.c,v 1.10 2002/05/26 00:12:13 wiz Exp $"); #endif #endif /* not lint */ #include <sys/file.h> #include <termios.h> -#if __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif +#include <stdarg.h> #include "mille.h" #ifndef unctrl @@ -64,21 +60,11 @@ __RCSID("$NetBSD: misc.c,v 1.9 2000/04/27 00:33:49 jdc Exp $"); #define NUMSAFE 4 bool -#if __STDC__ error(const char *str, ...) -#else -error(str, va_alist) - const char *str; - va_dcl -#endif { va_list ap; -#if __STDC__ va_start(ap, str); -#else - va_start(ap); -#endif wmove(Score, ERR_Y, ERR_X); vwprintw(Score, str, ap); wclrtoeol(Score); |