diff options
| author | wiz <wiz@NetBSD.org> | 2002-05-26 16:53:30 +0000 |
|---|---|---|
| committer | wiz <wiz@NetBSD.org> | 2002-05-26 16:53:30 +0000 |
| commit | 143cf52f816688c8d023c5b9c414f4eaaa48ce41 (patch) | |
| tree | 1bb8cc565cf51c5154bc1f38b365db8d24b593b0 /lib/libcurses | |
| parent | 738d04eceea0a2a1ee9416606206f3d66ed21960 (diff) | |
__STDC__ is always defined on NetBSD.
Diffstat (limited to 'lib/libcurses')
| -rw-r--r-- | lib/libcurses/ctrace.c | 21 | ||||
| -rw-r--r-- | lib/libcurses/printw.c | 55 | ||||
| -rw-r--r-- | lib/libcurses/scanw.c | 52 | ||||
| -rw-r--r-- | lib/libcurses/tscroll.c | 14 |
4 files changed, 9 insertions, 133 deletions
diff --git a/lib/libcurses/ctrace.c b/lib/libcurses/ctrace.c index 5828b23868a..d7f92508bb5 100644 --- a/lib/libcurses/ctrace.c +++ b/lib/libcurses/ctrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: ctrace.c,v 1.11 2001/09/24 13:22:30 wiz Exp $ */ +/* $NetBSD: ctrace.c,v 1.12 2002/05/26 17:01:38 wiz Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -38,18 +38,13 @@ #if 0 static char sccsid[] = "@(#)ctrace.c 8.2 (Berkeley) 10/5/93"; #else -__RCSID("$NetBSD: ctrace.c,v 1.11 2001/09/24 13:22:30 wiz Exp $"); +__RCSID("$NetBSD: ctrace.c,v 1.12 2002/05/26 17:01:38 wiz Exp $"); #endif #endif /* not lint */ #ifdef DEBUG -#include <stdio.h> - -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif +#include <stdio.h> #include <sys/time.h> #include <string.h> @@ -64,13 +59,7 @@ __RCSID("$NetBSD: ctrace.c,v 1.11 2001/09/24 13:22:30 wiz Exp $"); static FILE *tracefp; /* Curses debugging file descriptor. */ void -#ifdef __STDC__ __CTRACE(const char *fmt,...) -#else -__CTRACE(fmt, va_alist) - char *fmt; -va_dcl -#endif { struct timeval tv; static int seencr = 1; @@ -85,11 +74,7 @@ va_dcl gettimeofday(&tv, NULL); (void) fprintf(tracefp, "%lu.%06lu: ", tv.tv_sec, tv.tv_usec); } -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif (void) vfprintf(tracefp, fmt, ap); seencr = (strchr(fmt, '\n') != NULL); va_end(ap); diff --git a/lib/libcurses/printw.c b/lib/libcurses/printw.c index 9aa0a4ad316..d6c72f066c6 100644 --- a/lib/libcurses/printw.c +++ b/lib/libcurses/printw.c @@ -1,4 +1,4 @@ -/* $NetBSD: printw.c,v 1.17 2001/09/24 13:22:30 wiz Exp $ */ +/* $NetBSD: printw.c,v 1.18 2002/05/26 17:01:38 wiz Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -38,24 +38,17 @@ #if 0 static char sccsid[] = "@(#)printw.c 8.3 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: printw.c,v 1.17 2001/09/24 13:22:30 wiz Exp $"); +__RCSID("$NetBSD: printw.c,v 1.18 2002/05/26 17:01:38 wiz Exp $"); #endif #endif /* not lint */ -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "curses.h" #include "curses_private.h" /* * printw and friends. - * - * These routines make nonportable assumptions about varargs if __STDC__ - * is not in effect. */ static int __winwrite __P((void *, const char *, int)); @@ -65,22 +58,12 @@ static int __winwrite __P((void *, const char *, int)); * Printf on the standard screen. */ int -#ifdef __STDC__ printw(const char *fmt,...) -#else -printw(fmt, va_alist) - const char *fmt; -va_dcl -#endif { va_list ap; int ret; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vwprintw(stdscr, fmt, ap); va_end(ap); return (ret); @@ -90,23 +73,12 @@ va_dcl * Printf on the given window. */ int -#ifdef __STDC__ wprintw(WINDOW *win, const char *fmt,...) -#else -wprintw(win, fmt, va_alist) - WINDOW *win; - const char *fmt; -va_dcl -#endif { va_list ap; int ret; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vwprintw(win, fmt, ap); va_end(ap); return (ret); @@ -117,40 +89,21 @@ va_dcl * arguments, they cannot be macros. Sigh.... */ int -#ifdef __STDC__ mvprintw(int y, int x, const char *fmt,...) -#else -mvprintw(y, x, fmt, va_alist) - int y, x; - const char *fmt; -va_dcl -#endif { va_list ap; int ret; if (move(y, x) != OK) return (ERR); -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vwprintw(stdscr, fmt, ap); va_end(ap); return (ret); } int -#ifdef __STDC__ mvwprintw(WINDOW * win, int y, int x, const char *fmt,...) -#else -mvwprintw(win, y, x, fmt, va_alist) - WINDOW *win; - int y, x; - const char *fmt; -va_dcl -#endif { va_list ap; int ret; @@ -158,11 +111,7 @@ va_dcl if (wmove(win, y, x) != OK) return (ERR); -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vwprintw(win, fmt, ap); va_end(ap); return (ret); diff --git a/lib/libcurses/scanw.c b/lib/libcurses/scanw.c index 8cadbdd6d5c..0fabb781b61 100644 --- a/lib/libcurses/scanw.c +++ b/lib/libcurses/scanw.c @@ -1,4 +1,4 @@ -/* $NetBSD: scanw.c,v 1.15 2000/12/30 17:20:55 martin Exp $ */ +/* $NetBSD: scanw.c,v 1.16 2002/05/26 17:01:38 wiz Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)scanw.c 8.3 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: scanw.c,v 1.15 2000/12/30 17:20:55 martin Exp $"); +__RCSID("$NetBSD: scanw.c,v 1.16 2002/05/26 17:01:38 wiz Exp $"); #endif #endif /* not lint */ @@ -46,11 +46,7 @@ __RCSID("$NetBSD: scanw.c,v 1.15 2000/12/30 17:20:55 martin Exp $"); * scanw and friends. */ -#ifdef __STDC__ #include <stdarg.h> -#else -#include <varargs.h> -#endif #include "curses.h" @@ -59,22 +55,12 @@ __RCSID("$NetBSD: scanw.c,v 1.15 2000/12/30 17:20:55 martin Exp $"); * Implement a scanf on the standard screen. */ int -#ifdef __STDC__ scanw(const char *fmt,...) -#else -scanw(fmt, va_alist) - const char *fmt; -va_dcl -#endif { va_list ap; int ret; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vwscanw(stdscr, fmt, ap); va_end(ap); return (ret); @@ -84,23 +70,12 @@ va_dcl * Implements a scanf on the given window. */ int -#ifdef __STDC__ wscanw(WINDOW *win, const char *fmt,...) -#else -wscanw(win, fmt, va_alist) - WINDOW *win; - const char *fmt; -va_dcl -#endif { va_list ap; int ret; -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vwscanw(win, fmt, ap); va_end(ap); return (ret); @@ -111,51 +86,28 @@ va_dcl * arguments, they cannot be macros. Another sigh.... */ int -#ifdef __STDC__ mvscanw(int y, int x, const char *fmt,...) -#else -mvscanw(y, x, fmt, va_alist) - int y, x; - const char *fmt; -va_dcl -#endif { va_list ap; int ret; if (move(y, x) != OK) return (ERR); -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vwscanw(stdscr, fmt, ap); va_end(ap); return (ret); } int -#ifdef __STDC__ mvwscanw(WINDOW * win, int y, int x, const char *fmt,...) -#else -mvwscanw(win, y, x, fmt, va_alist) - WINDOW *win; - int y, x; - const char *fmt; -va_dcl -#endif { va_list ap; int ret; if (move(y, x) != OK) return (ERR); -#ifdef __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vwscanw(win, fmt, ap); va_end(ap); return (ret); diff --git a/lib/libcurses/tscroll.c b/lib/libcurses/tscroll.c index 20eb9044e4c..a6e6410277c 100644 --- a/lib/libcurses/tscroll.c +++ b/lib/libcurses/tscroll.c @@ -1,4 +1,4 @@ -/* $NetBSD: tscroll.c,v 1.9 2000/04/27 00:27:56 jdc Exp $ */ +/* $NetBSD: tscroll.c,v 1.10 2002/05/26 17:01:38 wiz Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)tscroll.c 8.4 (Berkeley) 7/27/94"; #else -__RCSID("$NetBSD: tscroll.c,v 1.9 2000/04/27 00:27:56 jdc Exp $"); +__RCSID("$NetBSD: tscroll.c,v 1.10 2002/05/26 17:01:38 wiz Exp $"); #endif #endif /* not lint */ @@ -81,13 +81,7 @@ __tscroll(const char *cap, int n1, int n2) * is also defined but we don't support it (yet). */ char * -#if __STDC__ __parse_cap (char const *cap, ...) -#else -__parse_cap (cap, va_alist) - const char *cap; - va_dcl -#endif { va_list ap; static char result[MAXRETURNSIZE]; @@ -95,11 +89,7 @@ __parse_cap (cap, va_alist) char *dp; int have_input; -#if __STDC__ va_start (ap, cap); -#else - va_start(ap); -#endif n = 0; /* XXX gcc -Wuninitialized */ if (cap == NULL) |
