summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
commit3923126b85f9e8a77cab9a41b5a62125acd5b4cd (patch)
tree1a8b19c5db03f8c989fc8228811837b182feb7a3 /usr.bin
parentcc03bdb70090357d2393b6ec82e3cde4d5ce5edd (diff)
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/file/is_tar.c6
-rw-r--r--usr.bin/file/print.c24
-rw-r--r--usr.bin/ftp/ftp.c26
-rw-r--r--usr.bin/indent/io.c26
-rw-r--r--usr.bin/make/defines.h7
-rw-r--r--usr.bin/make/error.c69
-rw-r--r--usr.bin/make/targ.c7
-rw-r--r--usr.bin/make/util.c32
-rw-r--r--usr.bin/oldrdist/main.c22
-rw-r--r--usr.bin/oldrdist/server.c58
-rw-r--r--usr.bin/patch/backupfile.h7
-rw-r--r--usr.bin/printf/printf.c23
-rw-r--r--usr.bin/rdist/rdist.c9
-rw-r--r--usr.bin/rlogin/rlogin.c24
-rw-r--r--usr.bin/rsh/rsh.c21
-rw-r--r--usr.bin/sed/misc.c22
-rw-r--r--usr.bin/su/su.c40
-rw-r--r--usr.bin/sup/src/libc.h57
-rw-r--r--usr.bin/sup/src/log.c69
-rw-r--r--usr.bin/sup/src/quit.c18
-rw-r--r--usr.bin/sup/src/run.c34
-rw-r--r--usr.bin/sup/src/scm.c23
-rw-r--r--usr.bin/sup/src/snprintf.c18
-rw-r--r--usr.bin/sup/src/sup.h8
-rw-r--r--usr.bin/sup/src/supcmain.c6
-rw-r--r--usr.bin/sup/src/supcmeat.c31
-rw-r--r--usr.bin/sup/src/supcmisc.c15
-rw-r--r--usr.bin/sup/src/supfilesrv.c19
-rw-r--r--usr.bin/sup/src/supmsg.c16
-rw-r--r--usr.bin/sup/src/supscan.c20
-rw-r--r--usr.bin/sup/src/sysent.h11
-rw-r--r--usr.bin/sup/src/time.h15
-rw-r--r--usr.bin/sup/src/unvis.c9
-rw-r--r--usr.bin/sup/src/vis.c6
-rw-r--r--usr.bin/sup/src/vis.h10
-rw-r--r--usr.bin/systat/main.c25
-rw-r--r--usr.bin/vi/common/msg.c21
-rw-r--r--usr.bin/vi/common/util.c17
-rw-r--r--usr.bin/vi/ex/ex_print.c20
-rw-r--r--usr.bin/xlint/lint1/emit.c12
-rw-r--r--usr.bin/xlint/lint1/err.c58
-rw-r--r--usr.bin/xlint/lint1/param.h18
-rw-r--r--usr.bin/xlint/lint1/scan.l12
-rw-r--r--usr.bin/xlint/lint2/msg.c21
-rw-r--r--usr.bin/xlint/lint2/read.c12
45 files changed, 91 insertions, 933 deletions
diff --git a/usr.bin/file/is_tar.c b/usr.bin/file/is_tar.c
index f6a7ad4c682..b8fab275fe1 100644
--- a/usr.bin/file/is_tar.c
+++ b/usr.bin/file/is_tar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: is_tar.c,v 1.4 2001/11/19 19:02:13 mpech Exp $ */
+/* $OpenBSD: is_tar.c,v 1.5 2002/02/19 19:39:38 millert Exp $ */
/*
* is_tar() -- figure out whether file is a tar archive.
@@ -19,11 +19,7 @@
#define isodigit(c) ( ((c) >= '0') && ((c) <= '7') )
-#if defined(__STDC__) || defined(__cplusplus)
static int from_oct(int, char*); /* Decode octal number */
-#else
-static int from_oct();
-#endif
/*
* Return
diff --git a/usr.bin/file/print.c b/usr.bin/file/print.c
index 0bc8c5f1fe2..804eb79b0c2 100644
--- a/usr.bin/file/print.c
+++ b/usr.bin/file/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.6 1998/07/10 15:05:25 mickey Exp $ */
+/* $OpenBSD: print.c,v 1.7 2002/02/19 19:39:38 millert Exp $ */
/*
* print.c - debugging printout routines
@@ -30,11 +30,7 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
-#ifdef __STDC__
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
+#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
@@ -42,7 +38,7 @@
#include "file.h"
#ifndef lint
-static char *moduleid = "$OpenBSD: print.c,v 1.6 1998/07/10 15:05:25 mickey Exp $";
+static char *moduleid = "$OpenBSD: print.c,v 1.7 2002/02/19 19:39:38 millert Exp $";
#endif /* lint */
#define SZOF(a) (sizeof(a) / sizeof(a[0]))
@@ -124,23 +120,11 @@ ckfputs(str, fil)
/*VARARGS*/
void
-#ifdef __STDC__
ckfprintf(FILE *f, const char *fmt, ...)
-#else
-ckfprintf(va_alist)
- va_dcl
-#endif
{
va_list va;
-#ifdef __STDC__
+
va_start(va, fmt);
-#else
- FILE *f;
- const char *fmt;
- va_start(va);
- f = va_arg(va, FILE *);
- fmt = va_arg(va, const char *);
-#endif
(void) vfprintf(f, fmt, va);
if (ferror(f))
err(1, "write failed");
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c
index aa38b099fc9..14c2866b599 100644
--- a/usr.bin/ftp/ftp.c
+++ b/usr.bin/ftp/ftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp.c,v 1.42 2002/02/16 21:27:46 millert Exp $ */
+/* $OpenBSD: ftp.c,v 1.43 2002/02/19 19:39:38 millert Exp $ */
/* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */
/*
@@ -67,7 +67,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-static char rcsid[] = "$OpenBSD: ftp.c,v 1.42 2002/02/16 21:27:46 millert Exp $";
+static char rcsid[] = "$OpenBSD: ftp.c,v 1.43 2002/02/19 19:39:38 millert Exp $";
#endif
#endif /* not lint */
@@ -91,11 +91,7 @@ static char rcsid[] = "$OpenBSD: ftp.c,v 1.42 2002/02/16 21:27:46 millert Exp $"
#include <string.h>
#include <unistd.h>
#include <utime.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "ftp_var.h"
@@ -292,29 +288,16 @@ cmdabort(notused)
/*VARARGS*/
int
-#ifdef __STDC__
command(const char *fmt, ...)
-#else
-command(va_alist)
- va_dcl
-#endif
{
va_list ap;
int r;
sig_t oldintr;
-#ifndef __STDC__
- const char *fmt;
-#endif
abrtflag = 0;
if (debug) {
fputs("---> ", ttyout);
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
- fmt = va_arg(ap, const char *);
-#endif
if (strncmp("PASS ", fmt, 5) == 0)
fputs("PASS XXXX", ttyout);
else if (strncmp("ACCT ", fmt, 5) == 0)
@@ -331,12 +314,7 @@ command(va_alist)
return (0);
}
oldintr = signal(SIGINT, cmdabort);
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
vfprintf(cout, fmt, ap);
va_end(ap);
fputs("\r\n", cout);
diff --git a/usr.bin/indent/io.c b/usr.bin/indent/io.c
index c1abb2c8be0..fe32c8f4d9a 100644
--- a/usr.bin/indent/io.c
+++ b/usr.bin/indent/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.4 2001/01/08 07:14:42 pjanzen Exp $ */
+/* $OpenBSD: io.c,v 1.5 2002/02/19 19:39:38 millert Exp $ */
/*
* Copyright (c) 1985 Sun Microsystems, Inc.
@@ -37,13 +37,14 @@
#ifndef lint
/*static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 6/6/93";*/
-static char rcsid[] = "$OpenBSD: io.c,v 1.4 2001/01/08 07:14:42 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: io.c,v 1.5 2002/02/19 19:39:38 millert Exp $";
#endif /* not lint */
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
#include <err.h>
#include "indent_globs.h"
@@ -537,32 +538,15 @@ count_spaces(current, buffer)
return (cur);
}
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
int found_err;
/* VARARGS2 */
void
-#if __STDC__
diag(int level, char *msg, ...)
-#else
-diag(level, msg, va_alist)
- int level;
- char *msg;
- va_dcl
-#endif
{
- va_list ap;
-#if __STDC__
- va_start(ap, msg);
-#else
- va_start(ap);
-#endif
+ va_list ap;
+ va_start(ap, msg);
if (level)
found_err = 1;
if (output == stdout) {
diff --git a/usr.bin/make/defines.h b/usr.bin/make/defines.h
index dbf14cab830..11961a94c77 100644
--- a/usr.bin/make/defines.h
+++ b/usr.bin/make/defines.h
@@ -2,7 +2,7 @@
#define DEFINES_H
/* $OpenPackages$ */
-/* $OpenBSD: defines.h,v 1.1 2001/05/23 12:34:41 espie Exp $ */
+/* $OpenBSD: defines.h,v 1.2 2002/02/19 19:39:38 millert Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
@@ -93,12 +93,7 @@ extern int debug;
#define DEBUG_FOR 0x0400
#define DEBUG_LOUD 0x0800
-#ifdef __STDC__
#define CONCAT(a,b) a##b
-#else
-#define I(a) a
-#define CONCAT(a,b) I(a)b
-#endif /* __STDC__ */
#define DEBUG(module) (debug & CONCAT(DEBUG_,module))
diff --git a/usr.bin/make/error.c b/usr.bin/make/error.c
index 8bcd6363cee..086739a4ed4 100644
--- a/usr.bin/make/error.c
+++ b/usr.bin/make/error.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: error.c,v 1.9 2001/09/05 22:32:41 deraadt Exp $ */
+/* $OpenBSD: error.c,v 1.10 2002/02/19 19:39:38 millert Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
@@ -25,14 +25,10 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
+#include <stdarg.h>
#include "config.h"
#include "defines.h"
@@ -50,22 +46,11 @@ static void ParseVErrorInternal(const char *, unsigned long, int, const char *,
*/
/* VARARGS */
void
-#ifdef __STDC__
Error(char *fmt, ...)
-#else
-Error(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- char *fmt;
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
+ va_start(ap, fmt);
(void)vfprintf(stderr, fmt, ap);
va_end(ap);
(void)fprintf(stderr, "\n");
@@ -81,22 +66,11 @@ Error(va_alist)
*/
/* VARARGS */
void
-#ifdef __STDC__
Fatal(char *fmt, ...)
-#else
-Fatal(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- char *fmt;
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
+ va_start(ap, fmt);
Job_Wait();
(void)vfprintf(stderr, fmt, ap);
@@ -118,23 +92,11 @@ Fatal(va_alist)
*/
/* VARARGS */
void
-#ifdef __STDC__
Punt(char *fmt, ...)
-#else
-Punt(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
+ va_start(ap, fmt);
(void)fprintf(stderr, "make: ");
(void)vfprintf(stderr, fmt, ap);
va_end(ap);
@@ -186,13 +148,8 @@ Finish(errors)
*/
/* VARARGS */
static void
-#ifdef __STDC__
ParseVErrorInternal(const char *cfname, unsigned long clineno, int type,
const char *fmt, va_list ap)
-#else
-ParseVErrorInternal(va_alist)
- va_dcl
-#endif
{
if (cfname)
(void)fprintf(stderr, "\"%s\", line %lu: ", cfname, clineno);
@@ -212,25 +169,11 @@ ParseVErrorInternal(va_alist)
*/
/* VARARGS */
void
-#ifdef __STDC__
Parse_Error(int type, const char *fmt, ...)
-#else
-Parse_Error(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- int type; /* Error type (PARSE_WARNING, PARSE_FATAL) */
- char *fmt;
-
- va_start(ap);
- type = va_arg(ap, int);
- fmt = va_arg(ap, char *);
-#endif
+ va_start(ap, fmt);
ParseVErrorInternal(Parse_Getfilename(), Parse_Getlineno(), type, fmt, ap);
va_end(va);
}
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index f30c50667c5..d05fc425a72 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: targ.c,v 1.34 2001/05/29 12:53:43 espie Exp $ */
+/* $OpenBSD: targ.c,v 1.35 2002/02/19 19:39:38 millert Exp $ */
/* $NetBSD: targ.c,v 1.11 1997/02/20 16:51:50 christos Exp $ */
/*
@@ -447,13 +447,8 @@ Targ_PrintType(type)
{
int tbit;
-#ifdef __STDC__
#define PRINTBIT(attr) case CONCAT(OP_,attr): printf("." #attr " "); break
#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG)) printf("." #attr " "); break
-#else
-#define PRINTBIT(attr) case CONCAT(OP_,attr): printf(".attr "); break
-#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG)) printf(".attr "); break
-#endif /* __STDC__ */
type &= ~OP_OPMASK;
diff --git a/usr.bin/make/util.c b/usr.bin/make/util.c
index 5de54011808..131bd9e18c0 100644
--- a/usr.bin/make/util.c
+++ b/usr.bin/make/util.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: util.c,v 1.16 2001/05/23 12:34:51 espie Exp $ */
+/* $OpenBSD: util.c,v 1.17 2002/02/19 19:39:38 millert Exp $ */
/* $NetBSD: util.c,v 1.10 1996/12/31 17:56:04 christos Exp $ */
/*
@@ -35,16 +35,8 @@
#include "config.h"
#include "defines.h"
-#ifndef __STDC__
-# ifndef const
-# define const
-# endif
-#endif
-
#ifdef sun
-
-
extern int errno, sys_nerr;
extern char *sys_errlist[];
@@ -375,11 +367,7 @@ signal(s, a))()
#endif
#ifndef BSD4_4
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef _IOSTRG
#define STRFLAG (_IOSTRG|_IOWRT) /* no _IOWRT: avoid stdio bug */
@@ -413,28 +401,12 @@ vsnprintf(s, n, fmt, args)
}
int
-#ifdef __STDC__
snprintf(char *s, size_t n, const char *fmt, ...)
-#else
-snprintf(va_alist)
- va_dcl
-#endif
{
va_list ap;
int rv;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- char *s;
- size_t n;
- const char *fmt;
-
- va_start(ap);
- s = va_arg(ap, char *);
- n = va_arg(ap, size_t);
- fmt = va_arg(ap, const char *);
-#endif
+ va_start(ap, fmt);
rv = vsnprintf(s, n, fmt, ap);
va_end(ap);
return rv;
diff --git a/usr.bin/oldrdist/main.c b/usr.bin/oldrdist/main.c
index 40c3122ba4b..a360802a507 100644
--- a/usr.bin/oldrdist/main.c
+++ b/usr.bin/oldrdist/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.11 2002/02/16 21:27:50 millert Exp $ */
+/* $OpenBSD: main.c,v 1.12 2002/02/19 19:39:38 millert Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -41,9 +41,10 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: main.c,v 1.11 2002/02/16 21:27:50 millert Exp $";
+static char *rcsid = "$OpenBSD: main.c,v 1.12 2002/02/19 19:39:38 millert Exp $";
#endif /* not lint */
+#include <stdarg.h>
#include "defs.h"
#define NHOSTS 100
@@ -307,28 +308,13 @@ prnames(nl)
printf(")\n");
}
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
void
-#ifdef __STDC__
warn(const char *fmt, ...)
-#else
-warn(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
extern int yylineno;
va_list ap;
-#ifdef __STDC__
+
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
(void)fprintf(stderr, "rdist: line %d: Warning: ", yylineno);
(void)vfprintf(stderr, fmt, ap);
(void)fprintf(stderr, "\n");
diff --git a/usr.bin/oldrdist/server.c b/usr.bin/oldrdist/server.c
index 51afafea5a4..a7b878e60c2 100644
--- a/usr.bin/oldrdist/server.c
+++ b/usr.bin/oldrdist/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.16 2002/02/16 21:27:50 millert Exp $ */
+/* $OpenBSD: server.c,v 1.17 2002/02/19 19:39:38 millert Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -35,10 +35,11 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: server.c,v 1.16 2002/02/16 21:27:50 millert Exp $";
+static char *rcsid = "$OpenBSD: server.c,v 1.17 2002/02/19 19:39:38 millert Exp $";
#endif /* not lint */
#include <sys/wait.h>
+#include <stdarg.h>
#include "defs.h"
#define ack() (void) write(rem, "\0\n", 2)
@@ -1432,28 +1433,12 @@ dospecial(cmd)
ack();
}
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
void
-#ifdef __STDC__
log(FILE *fp, const char *fmt, ...)
-#else
-log(fp, fmt, va_alist)
- FILE *fp;
- char *fmt;
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
+
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
/* Print changes locally if not quiet mode */
if (!qflag)
(void) vprintf(fmt, ap);
@@ -1465,22 +1450,12 @@ log(fp, fmt, va_alist)
}
void
-#ifdef __STDC__
error(const char *fmt, ...)
-#else
-error(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
static FILE *fp;
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
+ va_start(ap, fmt);
++nerrs;
if (iamremote) {
if (!fp && (rem < 0 || !(fp = fdopen(rem, "w"))))
@@ -1504,22 +1479,12 @@ error(fmt, va_alist)
}
void
-#ifdef __STDC__
fatal(const char *fmt, ...)
-#else
-fatal(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
static FILE *fp;
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
+ va_start(ap, fmt);
++nerrs;
if (!fp && !(fp = fdopen(rem, "w")))
return;
@@ -1603,21 +1568,12 @@ cleanup(signo)
}
static void
-#ifdef __STDC__
note(const char *fmt, ...)
-#else
-note(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
static char buf[BUFSIZ];
va_list ap;
-#ifdef __STDC__
+
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
(void) vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
comment(buf);
diff --git a/usr.bin/patch/backupfile.h b/usr.bin/patch/backupfile.h
index 16881d2633b..3773aa12b28 100644
--- a/usr.bin/patch/backupfile.h
+++ b/usr.bin/patch/backupfile.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: backupfile.h,v 1.2 1996/06/10 11:21:26 niklas Exp $*/
+/* $OpenBSD: backupfile.h,v 1.3 2002/02/19 19:39:39 millert Exp $*/
/* backupfile.h -- declarations for making Emacs style backup file names
Copyright (C) 1990 Free Software Foundation, Inc.
@@ -31,10 +31,5 @@ enum backup_type
extern enum backup_type backup_type;
extern char *simple_backup_suffix;
-#ifdef __STDC__
char *find_backup_file_name (char *file);
enum backup_type get_version (char *version);
-#else
-char *find_backup_file_name ();
-enum backup_type get_version ();
-#endif
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index 859be7d9ba0..5215d405963 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printf.c,v 1.6 2002/02/16 21:27:51 millert Exp $ */
+/* $OpenBSD: printf.c,v 1.7 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1989 The Regents of the University of California.
@@ -43,7 +43,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)printf.c 5.9 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$OpenBSD: printf.c,v 1.6 2002/02/16 21:27:51 millert Exp $";
+static char rcsid[] = "$OpenBSD: printf.c,v 1.7 2002/02/19 19:39:39 millert Exp $";
#endif /* not lint */
#include <ctype.h>
@@ -78,31 +78,16 @@ static char **gargv;
#ifdef SHELL
#define main printfcmd
#include "../../bin/sh/bltin/bltin.h"
-
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <vararg.h>
-#endif
static void
-#ifdef __STDC__
warnx(const char *fmt, ...)
-#else
-warnx(fmt, va_alist)
- const char *fmt;
- va_dcl
-#endif
{
char buf[64];
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
vsprintf(buf, fmt, ap);
va_end(ap);
@@ -369,11 +354,7 @@ print_escape(str)
break;
case 'a': /* alert */
-#ifdef __STDC__
putchar('\a');
-#else
- putchar(007);
-#endif
break;
case 'b': /* backspace */
diff --git a/usr.bin/rdist/rdist.c b/usr.bin/rdist/rdist.c
index 1b7792fc0f4..b3832bf46e2 100644
--- a/usr.bin/rdist/rdist.c
+++ b/usr.bin/rdist/rdist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rdist.c,v 1.11 2001/12/29 23:16:10 millert Exp $ */
+/* $OpenBSD: rdist.c,v 1.12 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -39,7 +39,7 @@ static char RCSid[] =
"$From: rdist.c,v 6.65 1995/12/12 00:20:39 mcooper Exp $";
#else
static char RCSid[] =
-"$OpenBSD: rdist.c,v 1.11 2001/12/29 23:16:10 millert Exp $";
+"$OpenBSD: rdist.c,v 1.12 2002/02/19 19:39:39 millert Exp $";
#endif
static char sccsid[] = "@(#)main.c 5.1 (Berkeley) 6/6/85";
@@ -59,13 +59,8 @@ static char copyright[] =
* Remote distribution program.
*/
-#ifdef __STDC__
void docmdargs(int, char **);
void usage(void);
-#else
-void docmdargs();
-void usage();
-#endif
char *distfile = NULL; /* Name of distfile to use */
int maxchildren = MAXCHILDREN; /* Max no of concurrent PIDs */
diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c
index 8f26b31ca6a..39b80273bb3 100644
--- a/usr.bin/rlogin/rlogin.c
+++ b/usr.bin/rlogin/rlogin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlogin.c,v 1.29 2002/02/17 19:42:31 millert Exp $ */
+/* $OpenBSD: rlogin.c,v 1.30 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: rlogin.c,v 1.8 1995/10/05 09:07:22 mycroft Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rlogin.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: rlogin.c,v 1.29 2002/02/17 19:42:31 millert Exp $";
+static char rcsid[] = "$OpenBSD: rlogin.c,v 1.30 2002/02/19 19:39:39 millert Exp $";
#endif
#endif /* not lint */
@@ -73,12 +73,7 @@ static char rcsid[] = "$OpenBSD: rlogin.c,v 1.29 2002/02/17 19:42:31 millert Exp
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef KERBEROS
#include <des.h>
@@ -604,12 +599,7 @@ writer()
}
void
-#ifdef __STDC__
echo(char c)
-#else
-echo(c)
- char c;
-#endif
{
char *p;
char buf[8];
@@ -890,13 +880,7 @@ msg(str)
#ifdef KERBEROS
/* VARARGS */
void
-#ifdef __STDC__
warning(const char *fmt, ...)
-#else
-warning(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
char myrealm[REALM_SZ];
va_list ap;
@@ -904,11 +888,7 @@ warning(fmt, va_alist)
if (krb_get_lrealm(myrealm, 0) != KSUCCESS)
return;
(void)fprintf(stderr, "rlogin: warning, using standard rlogin: ");
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
vfprintf(stderr, fmt, ap);
va_end(ap);
(void)fprintf(stderr, ".\n");
diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c
index 1549077fd57..64b3bf31b55 100644
--- a/usr.bin/rsh/rsh.c
+++ b/usr.bin/rsh/rsh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsh.c,v 1.24 2002/02/17 19:42:31 millert Exp $ */
+/* $OpenBSD: rsh.c,v 1.25 2002/02/19 19:39:39 millert Exp $ */
/*-
* Copyright (c) 1983, 1990 The Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)rsh.c 5.24 (Berkeley) 7/1/91";*/
-static char rcsid[] = "$OpenBSD: rsh.c,v 1.24 2002/02/17 19:42:31 millert Exp $";
+static char rcsid[] = "$OpenBSD: rsh.c,v 1.25 2002/02/19 19:39:39 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -59,11 +59,7 @@ static char rcsid[] = "$OpenBSD: rsh.c,v 1.24 2002/02/17 19:42:31 millert Exp $"
#include <unistd.h>
#include <errno.h>
#include <string.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "pathnames.h"
#ifdef KERBEROS
@@ -444,28 +440,15 @@ sendsig(signo)
#ifdef KERBEROS
/* VARARGS */
void
-#ifdef __STDC__
warning(const char *fmt, ...)
-#else
-warning(va_alist)
-va_dcl
-#endif
{
va_list ap;
-#ifndef __STDC__
- char *fmt;
-#endif
char myrealm[REALM_SZ];
if (krb_get_lrealm(myrealm, 0) != KSUCCESS)
return;
(void)fprintf(stderr, "rsh: warning, using standard rsh: ");
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
vfprintf(stderr, fmt, ap);
va_end(ap);
(void)fprintf(stderr, ".\n");
diff --git a/usr.bin/sed/misc.c b/usr.bin/sed/misc.c
index c70346b2155..c23a66c05b5 100644
--- a/usr.bin/sed/misc.c
+++ b/usr.bin/sed/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.3 1997/07/25 21:05:41 mickey Exp $ */
+/* $OpenBSD: misc.c,v 1.4 2002/02/19 19:39:39 millert Exp $ */
/*-
* Copyright (c) 1992 Diomidis Spinellis.
@@ -39,7 +39,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93"; */
-static char *rcsid = "$OpenBSD: misc.c,v 1.3 1997/07/25 21:05:41 mickey Exp $";
+static char *rcsid = "$OpenBSD: misc.c,v 1.4 2002/02/19 19:39:39 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -49,6 +49,7 @@ static char *rcsid = "$OpenBSD: misc.c,v 1.3 1997/07/25 21:05:41 mickey Exp $";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
#include "defs.h"
#include "extern.h"
@@ -104,30 +105,15 @@ strregerror(errcode, preg)
return (oe);
}
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
/*
* Error reporting function
*/
void
-#ifdef __STDC__
err(int severity, const char *fmt, ...)
-#else
-err(severity, fmt, va_alist)
- int severity;
- char *fmt;
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
+
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
(void)fprintf(stderr, "sed: ");
switch (severity) {
case WARNING:
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c
index c9eba97b477..0fd273982ff 100644
--- a/usr.bin/su/su.c
+++ b/usr.bin/su/su.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: su.c,v 1.43 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: su.c,v 1.44 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -43,7 +43,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "from: @(#)su.c 5.26 (Berkeley) 7/6/91";
#else
-static const char rcsid[] = "$OpenBSD: su.c,v 1.43 2002/02/16 21:27:54 millert Exp $";
+static const char rcsid[] = "$OpenBSD: su.c,v 1.44 2002/02/19 19:39:39 millert Exp $";
#endif
#endif /* not lint */
@@ -62,11 +62,7 @@ static const char rcsid[] = "$OpenBSD: su.c,v 1.43 2002/02/16 21:27:54 millert E
#include <string.h>
#include <syslog.h>
#include <unistd.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <bsd_auth.h>
char *ontty(void);
@@ -349,52 +345,20 @@ usage()
}
void
-#ifdef __STDC__
auth_err(auth_session_t *as, int eval, const char *fmt, ...)
-#else
-auth_err(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- auth_session_t *as;
- int eval;
- const char *fmt;
-
- va_start(ap);
- as = va_arg(ap, auth_session_t *);
- eval = va_arg(ap, int);
- fmt = va_arg(ap, const char *);
-#endif
verr(eval, fmt, ap);
auth_close(as);
va_end(ap);
}
void
-#ifdef __STDC__
auth_errx(auth_session_t *as, int eval, const char *fmt, ...)
-#else
-auth_errx(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- auth_session_t *as;
- int eval;
- const char *fmt;
-
- va_start(ap);
- as = va_arg(ap, auth_session_t *);
- eval = va_arg(ap, int);
- fmt = va_arg(ap, const char *);
-#endif
verrx(eval, fmt, ap);
auth_close(as);
va_end(ap);
diff --git a/usr.bin/sup/src/libc.h b/usr.bin/sup/src/libc.h
index 777555d2d7d..79d92cdb718 100644
--- a/usr.bin/sup/src/libc.h
+++ b/usr.bin/sup/src/libc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libc.h,v 1.7 2001/05/04 22:16:15 millert Exp $ */
+/* $OpenBSD: libc.h,v 1.8 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1991 Carnegie Mellon University
@@ -98,19 +98,12 @@
#endif /* _TIME_H_ */
/* CMU stdio additions */
-#if defined(__STDC__)
extern FILE *fopenp(const char*, const char*, char*, char*);
extern FILE *fwantread(const char*, const char*, const char*, const char*);
extern FILE *fwantwrite(const char*, const char*, const char*, const char*,
int);
-#else /* __STDC__ */
-extern FILE *fopenp();
-extern FILE *fwantread();
-extern FILE *fwantwrite();
-#endif /* __STDC__ */
/* CMU string routines */
-#if defined(__STDC__)
extern char* foldup(char*, const char*);
extern char* folddown(char*, const char*);
extern char* sindex(const char*, const char*);
@@ -146,41 +139,17 @@ extern unsigned int hexarg(const char**, const char*, const char*,
unsigned int, unsigned int, unsigned int);
extern unsigned int atoh(const char*);
extern char *concat(const char*, int, ...);
-#else /* __STDC__ */
-extern char *foldup(), *folddown();
-extern char *sindex(), *skipto(), *skipover(), *nxtarg();
-extern char *getstr(), *strarg();
-extern long getlong(), longarg();
-extern short getshort(), shortarg();
-extern float getfloat(), floatarg();
-extern double getdouble(), doublearg();
-extern unsigned int getoct(), octarg(), gethex(), hexarg();
-extern unsigned int atoo(), atoh();
-extern char *concat();
-#endif /* __STDC__ */
/* CMU library routines */
-#if defined(__STDC__)
extern char *getname(int);
extern char *pathof(char *);
extern const char *errmsg(int);
-#else /* __STDC__ */
-extern char *getname();
-extern char *pathof();
-extern const char *errmsg();
-#endif /* __STDC__ */
/* CMU time additions */
-#if defined(__STDC__)
extern long gtime(const struct tm*);
extern long atot(const char*);
-#else /* __STDC__ */
-extern long gtime();
-extern long atot();
-#endif /* __STDC__ */
/* 4.3 BSD standard library routines; taken from man(3) */
-#if defined(__STDC__)
#if 0
typedef int (*PFI)();
#endif
@@ -260,28 +229,4 @@ extern int ttyslot(void);
extern unsigned ualarm(unsigned, unsigned);
extern void usleep(unsigned);
#endif
-#else /* __STDC__ */
-extern double atof();
-extern long atol();
-extern char *crypt();
-extern char *ecvt();
-extern char *fcvt();
-extern char *gcvt();
-extern char *getenv();
-extern char *getlogin();
-extern char *getpass();
-extern char *getusershell();
-extern char *getwd();
-extern char *malloc();
-extern char *realloc();
-extern char *calloc();
-extern char *alloca();
-extern char *mktemp();
-extern long random();
-extern char *initstate();
-extern char *setstate();
-extern char *re_comp();
-extern char *ttyname();
-extern unsigned ualarm();
-#endif /* __STDC__ */
#endif /* not _LIBC_H_ */
diff --git a/usr.bin/sup/src/log.c b/usr.bin/sup/src/log.c
index 5f17ce9cc02..cfd184b28d5 100644
--- a/usr.bin/sup/src/log.c
+++ b/usr.bin/sup/src/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.7 2001/05/04 22:16:15 millert Exp $ */
+/* $OpenBSD: log.c,v 1.8 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -65,27 +65,12 @@ logopen(program)
}
void
-#ifdef __STDC__
logquit(int retval, char *fmt, ...)
-#else
-/*VARARGS*//*ARGSUSED*/
-logquit(va_alist)
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
va_list ap;
-#ifdef __STDC__
va_start(ap,fmt);
-#else
- int retval;
- char *fmt;
-
- va_start(ap);
- retval = va_arg(ap,int);
- fmt = va_arg(ap,char *);
-#endif
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (opened) {
@@ -97,25 +82,12 @@ va_dcl
}
void
-#ifdef __STDC__
logerr(char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-logerr(va_alist)
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
va_list ap;
-#ifdef __STDC__
va_start(ap,fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap,char *);
-#endif
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (opened) {
@@ -127,25 +99,12 @@ va_dcl
}
void
-#ifdef __STDC__
loginfo(char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-loginfo(va_alist)
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
va_list ap;
-#ifdef __STDC__
va_start(ap,fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap,char *);
-#endif
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (opened) {
@@ -174,25 +133,12 @@ int allow_severity = LIBWRAP_ALLOW_FACILITY|LIBWRAP_ALLOW_SEVERITY;
int deny_severity = LIBWRAP_DENY_FACILITY|LIBWRAP_DENY_SEVERITY;
void
-#ifdef __STDC__
logdeny(char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-logdeny(va_alist)
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
va_list ap;
-#ifdef __STDC__
va_start(ap,fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (opened) {
@@ -204,25 +150,12 @@ va_dcl
}
void
-#ifdef __STDC__
logallow(char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-logallow(va_alist)
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
va_list ap;
-#ifdef __STDC__
va_start(ap,fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap,char *);
-#endif
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
if (opened) {
diff --git a/usr.bin/sup/src/quit.c b/usr.bin/sup/src/quit.c
index fbbf0a0f3c6..b1db270374f 100644
--- a/usr.bin/sup/src/quit.c
+++ b/usr.bin/sup/src/quit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: quit.c,v 1.4 2001/04/29 21:52:15 millert Exp $ */
+/* $OpenBSD: quit.c,v 1.5 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1991 Carnegie Mellon University
@@ -49,25 +49,11 @@
#include "supextern.h"
void
-#ifdef __STDC__
quit (int status, char * fmt, ...)
-#else
-quit (va_alist)
-va_dcl
-#endif
{
va_list args;
-#ifdef __STDC__
- va_start(args, fmt);
-#else
- int status;
- char *fmt;
-
- va_start(args);
- status = va_arg(args, int);
- fmt = va_arg(args, char *);
-#endif
+ va_start(args, fmt);
fflush(stdout);
(void) vfprintf(stderr, fmt, args);
va_end(args);
diff --git a/usr.bin/sup/src/run.c b/usr.bin/sup/src/run.c
index 63113d3c71f..229f7555c20 100644
--- a/usr.bin/sup/src/run.c
+++ b/usr.bin/sup/src/run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: run.c,v 1.11 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: run.c,v 1.12 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1991 Carnegie Mellon University
@@ -95,12 +95,6 @@
#include "supcdefs.h"
#include "supextern.h"
-#ifndef __STDC__
-#ifndef const
-#define const
-#endif
-#endif
-
static int dorun(char *, char **, int);
static char **makearglist(va_list);
@@ -126,24 +120,12 @@ makearglist(ap)
}
int
-#ifdef __STDC__
run(char *name, ...)
-#else
-run(va_alist)
-va_dcl
-#endif
{
int val;
va_list ap;
char **argv;
-#ifdef __STDC__
va_start(ap, name);
-#else
- char *name;
-
- va_start(ap);
- name = va_arg(ap, char *);
-#endif
if ((argv = makearglist(ap)) == NULL)
return -1;
@@ -159,25 +141,13 @@ char *name,**argv;
}
int
-#ifdef __STDC__
runp(char *name, ...)
-#else
-runp (va_alist)
-va_dcl
-#endif
{
int val;
va_list ap;
char **argv;
-#ifdef __STDC__
- va_start(ap, name);
-#else
- char *name;
-
- va_start(ap);
- name = va_arg(ap, char *);
-#endif
+ va_start(ap, name);
if ((argv = makearglist(ap)) == NULL)
return -1;
val = runvp (name, argv);
diff --git a/usr.bin/sup/src/scm.c b/usr.bin/sup/src/scm.c
index c1b8702b573..f9c874cf344 100644
--- a/usr.bin/sup/src/scm.c
+++ b/usr.bin/sup/src/scm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scm.c,v 1.14 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: scm.c,v 1.15 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -177,11 +177,7 @@
#include <net/if.h>
#include <netdb.h>
#include <syslog.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "supcdefs.h"
#include "supextern.h"
@@ -627,26 +623,11 @@ matchhost(name) /* is this name of remote host? */
return (0);
}
-#ifdef __STDC__
int scmerr(int error,char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-int scmerr(va_alist)
-va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
- va_start(ap,fmt);
-#else
- int error;
- char *fmt;
-
- va_start(ap);
- error = va_arg(ap,int);
- fmt = va_arg(ap,char *);
-#endif
+ va_start(ap,fmt);
(void) fflush(stdout);
if (progpid > 0)
fprintf(stderr, "%s %d: ", program, progpid);
diff --git a/usr.bin/sup/src/snprintf.c b/usr.bin/sup/src/snprintf.c
index 6ffe59b1105..768c15796bd 100644
--- a/usr.bin/sup/src/snprintf.c
+++ b/usr.bin/sup/src/snprintf.c
@@ -34,15 +34,11 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: snprintf.c,v 1.1 1997/10/11 23:35:44 beck Exp $";
+static char rcsid[] = "$OpenBSD: snprintf.c,v 1.2 2002/02/19 19:39:39 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef _IOSTRG
#define STRFLAG (_IOSTRG|_IOWRT) /* no _IOWRT: avoid stdio bug */
@@ -51,15 +47,7 @@ static char rcsid[] = "$OpenBSD: snprintf.c,v 1.1 1997/10/11 23:35:44 beck Exp $
#endif
#ifdef NEED_SNPRINTF
-#ifdef __STDC__
snprintf(char *str, size_t n, char const *fmt, ...)
-#else
-snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -67,11 +55,7 @@ snprintf(str, n, fmt, va_alist)
if ((int)n < 1)
return (EOF);
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
f._flag = STRFLAG;
f._base = f._ptr = str;
f._cnt = n-1;
diff --git a/usr.bin/sup/src/sup.h b/usr.bin/sup/src/sup.h
index a1887be7ae6..d4e8512c780 100644
--- a/usr.bin/sup/src/sup.h
+++ b/usr.bin/sup/src/sup.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sup.h,v 1.8 2001/05/04 22:16:16 millert Exp $ */
+/* $OpenBSD: sup.h,v 1.9 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -247,8 +247,4 @@ typedef struct tliststruct TREELIST;
#define MAXCHILDREN 3 /* maximum number of children allowed
to sup at the same time */
-#ifdef __STDC__
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
+#include <stdarg.h>
diff --git a/usr.bin/sup/src/supcmain.c b/usr.bin/sup/src/supcmain.c
index 227bcec87b4..54800d9e29d 100644
--- a/usr.bin/sup/src/supcmain.c
+++ b/usr.bin/sup/src/supcmain.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supcmain.c,v 1.13 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: supcmain.c,v 1.14 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -605,11 +605,7 @@ init(argc, argv)
int oflags, aflags;
int cwant;
#ifdef MACH
-#ifdef __STDC__
void (*oldsigsys)();
-#else
- int (*oldsigsys)();
-#endif
#endif /* MACH */
sysflag = FALSE; /* not system upgrade */
diff --git a/usr.bin/sup/src/supcmeat.c b/usr.bin/sup/src/supcmeat.c
index 63b80e153b5..0a4442c6481 100644
--- a/usr.bin/sup/src/supcmeat.c
+++ b/usr.bin/sup/src/supcmeat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supcmeat.c,v 1.15 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: supcmeat.c,v 1.16 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -1501,27 +1501,12 @@ finishone(t, fv)
}
void
-#ifdef __STDC__
done (int value,char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-done (va_alist)
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- int value;
- char *fmt;
-
- va_start(ap);
- value = va_arg(ap, int);
- fmt = va_arg(ap, char *);
-#endif
(void) netcrypt(NULL);
if (fmt)
@@ -1543,26 +1528,12 @@ va_dcl
}
void
-#ifdef __STDC__
goaway (char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-goaway (va_alist)
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
-
(void) netcrypt (NULL);
if (fmt) {
vsnprintf(buf, sizeof(buf), fmt, ap);
diff --git a/usr.bin/sup/src/supcmisc.c b/usr.bin/sup/src/supcmisc.c
index ebafbc7979e..548c516f512 100644
--- a/usr.bin/sup/src/supcmisc.c
+++ b/usr.bin/sup/src/supcmisc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supcmisc.c,v 1.12 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: supcmisc.c,v 1.13 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -276,13 +276,7 @@ ugconvert(uname, gname, uid, gid, mode)
*********************************************/
void
-#ifdef __STDC__
notify (char *fmt,...) /* record error message */
-#else
-/*VARARGS*//*ARGSUSED*/
-notify (va_alist) /* record error message */
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
char collrelname[STRINGLENGTH];
@@ -290,14 +284,7 @@ va_dcl
static FILE *noteF = NULL; /* mail program on pipe */
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
if (fmt == NULL) {
if (noteF && noteF != stdout)
(void) pclose(noteF);
diff --git a/usr.bin/sup/src/supfilesrv.c b/usr.bin/sup/src/supfilesrv.c
index d29774fbe29..5a935914db1 100644
--- a/usr.bin/sup/src/supfilesrv.c
+++ b/usr.bin/sup/src/supfilesrv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supfilesrv.c,v 1.27 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: supfilesrv.c,v 1.28 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -222,11 +222,7 @@
#include <grp.h>
#include <fcntl.h>
#include <limits.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
@@ -1873,25 +1869,12 @@ changeuid(namep, passwordp, fileuid, filegid)
}
void
-#ifdef __STDC__
goaway(char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-goaway(va_alist)
-va_dcl
-#endif
{
char buf[STRINGLENGTH];
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
(void) netcrypt(NULL);
vsnprintf(buf, sizeof(buf), fmt, ap);
diff --git a/usr.bin/sup/src/supmsg.c b/usr.bin/sup/src/supmsg.c
index c639d637792..e22ce70571d 100644
--- a/usr.bin/sup/src/supmsg.c
+++ b/usr.bin/sup/src/supmsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supmsg.c,v 1.9 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: supmsg.c,v 1.10 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -571,27 +571,13 @@ writeone(t, v)
}
-#ifdef __STDC__
int
msgrecv(int (*xferfile)(TREE *, va_list),...)
-#else
-/*VARARGS*//*ARGSUSED*/
-int
-msgrecv(va_alist)
-va_dcl
-#endif
{
va_list args;
int x;
TREE *t = upgradeT;
-#ifdef __STDC__
va_start(args,xferfile);
-#else
- int (*xferfile)(TREE *, void *);
-
- va_start(args);
- xferfile = va_arg(args, int (*)(TREE *, void *));
-#endif
if (server) {
x = writemsg (MSGRECV);
if (t == NULL) {
diff --git a/usr.bin/sup/src/supscan.c b/usr.bin/sup/src/supscan.c
index 8c6a516e334..e70872fde80 100644
--- a/usr.bin/sup/src/supscan.c
+++ b/usr.bin/sup/src/supscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supscan.c,v 1.12 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: supscan.c,v 1.13 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -115,11 +115,7 @@
#include <c.h>
#include <netdb.h>
#include <setjmp.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <sys/time.h>
#include <sys/types.h>
#include "supcdefs.h"
@@ -388,25 +384,11 @@ getscancoll(filename, collname, basedir)
}
void
-#ifdef __STDC__
goaway(char *fmt,...)
-#else
-/*VARARGS*//*ARGSUSED*/
-goaway(va_alist)
-va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
va_start(ap,fmt);
-#else
- char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
-
vfprintf(stderr, fmt, ap);
va_end(ap);
(void) putc ('\n', stderr);
diff --git a/usr.bin/sup/src/sysent.h b/usr.bin/sup/src/sysent.h
index 607431a2d3e..f6a1d5141b0 100644
--- a/usr.bin/sup/src/sysent.h
+++ b/usr.bin/sup/src/sysent.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysent.h,v 1.6 2001/07/25 16:54:11 deraadt Exp $ */
+/* $OpenBSD: sysent.h,v 1.7 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1991 Carnegie Mellon University
@@ -47,7 +47,6 @@
#ifndef _SYSENT_H_
#define _SYSENT_H_ 1
-#if defined(__STDC__)
#if 0
#include <sys/types.h>
#include <sys/time.h>
@@ -133,12 +132,4 @@ extern int iwrite(int, int, int, int, void *, int);
extern int pioctl(const char *, unsigned long, struct ViceIoctl *, int);
extern int setpag(void);
#endif
-#else /* defined(__STDC__) */
-extern gid_t getgid();
-extern gid_t getegid();
-extern long gethostid();
-extern uid_t getuid();
-extern uid_t geteuid();
-extern off_t lseek();
-#endif /* __STDC__ */
#endif /* not _SYSENT_H_ */
diff --git a/usr.bin/sup/src/time.h b/usr.bin/sup/src/time.h
index 304191c5a43..becfaa4c5c6 100644
--- a/usr.bin/sup/src/time.h
+++ b/usr.bin/sup/src/time.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: time.h,v 1.3 1997/07/25 21:05:43 mickey Exp $ */
+/* $OpenBSD: time.h,v 1.4 2002/02/19 19:39:39 millert Exp $ */
/*
* Copyright (c) 1991 Carnegie Mellon University
@@ -69,7 +69,6 @@ struct tm {
char *tm_zone; /* timezone abbreviation */
};
-#if defined(__STDC__) || defined(c_plusplus)
extern struct tm *gmtime(const time_t *);
extern struct tm *localtime(const time_t *);
extern time_t mktime(const struct tm *);
@@ -80,17 +79,5 @@ extern char *ctime(const time_t *);
extern char *timezone(int , int);
extern void tzset(void);
extern void tzsetwall(void);
-#else
-extern struct tm *gmtime();
-extern struct tm *localtime();
-extern time_t mktime();
-extern time_t time();
-extern double difftime();
-extern char *asctime();
-extern char *ctime();
-extern char *timezone();
-extern void tzset();
-extern void tzsetwall();
-#endif
#endif /* _TIME_H */
diff --git a/usr.bin/sup/src/unvis.c b/usr.bin/sup/src/unvis.c
index 0c6b2e7c0c4..ea1550dea4c 100644
--- a/usr.bin/sup/src/unvis.c
+++ b/usr.bin/sup/src/unvis.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: unvis.c,v 1.2 2001/05/04 22:16:17 millert Exp $";
+static char rcsid[] = "$OpenBSD: unvis.c,v 1.3 2002/02/19 19:39:39 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -57,14 +57,7 @@ static char rcsid[] = "$OpenBSD: unvis.c,v 1.2 2001/05/04 22:16:17 millert Exp $
* unvis - decode characters previously encoded by vis
*/
int
-#ifdef __STDC__
unvis(char *cp, char c, int *astate, int flag)
-#else
-unvis(cp, c, astate, flag)
- char *cp;
- char c;
- int *astate, flag;
-#endif
{
if (flag & UNVIS_END) {
diff --git a/usr.bin/sup/src/vis.c b/usr.bin/sup/src/vis.c
index 4f772b4ced8..c4d25c75c26 100644
--- a/usr.bin/sup/src/vis.c
+++ b/usr.bin/sup/src/vis.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vis.c,v 1.2 2001/05/04 22:16:17 millert Exp $";
+static char rcsid[] = "$OpenBSD: vis.c,v 1.3 2002/02/19 19:39:39 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -77,11 +77,7 @@ vis(dst, c, flag, nextc)
*dst++ = '\\';
*dst++ = 'b';
goto done;
-#ifdef __STDC__
case '\a':
-#else
- case '\007':
-#endif
*dst++ = '\\';
*dst++ = 'a';
goto done;
diff --git a/usr.bin/sup/src/vis.h b/usr.bin/sup/src/vis.h
index 89ef59651b6..69fba380491 100644
--- a/usr.bin/sup/src/vis.h
+++ b/usr.bin/sup/src/vis.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vis.h,v 1.2 2001/05/05 15:56:04 millert Exp $ */
+/* $OpenBSD: vis.h,v 1.3 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: vis.h,v 1.4 1994/10/26 00:56:41 cgd Exp $ */
/*-
@@ -74,18 +74,10 @@
*/
#define UNVIS_END 1 /* no more characters */
-#ifdef __STDC__
char *vis(char *, int, int, int);
int strvis(char *, const char *, int);
int strvisx(char *, const char *, size_t, int);
int strunvis(char *, const char *);
int unvis(char *, char, int *, int);
-#else
-char *vis();
-int strvis();
-int strvisx();
-int strunvis();
-int unvis();
-#endif
#endif /* !_VIS_H_ */
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c
index add50f59b9a..0e17cf0fe66 100644
--- a/usr.bin/systat/main.c
+++ b/usr.bin/systat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.22 2002/02/16 21:27:54 millert Exp $ */
+/* $OpenBSD: main.c,v 1.23 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: main.c,v 1.8 1996/05/10 23:16:36 thorpej Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: main.c,v 1.22 2002/02/16 21:27:54 millert Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.23 2002/02/19 19:39:39 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -59,6 +59,7 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.22 2002/02/16 21:27:54 millert Exp $
#include <unistd.h>
#include <stdlib.h>
#include <limits.h>
+#include <stdarg.h>
#include "systat.h"
#include "extern.h"
@@ -300,32 +301,14 @@ sigwinch(signo)
gotwinch = 1;
}
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#ifdef __STDC__
void
error(const char *fmt, ...)
-#else
-void
-error(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
va_list ap;
char buf[255];
int oy, ox;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
+ va_start(ap, fmt);
if (wnd) {
getyx(stdscr, oy, ox);
(void) vsnprintf(buf, sizeof buf, fmt, ap);
diff --git a/usr.bin/vi/common/msg.c b/usr.bin/vi/common/msg.c
index dfff4e47a87..197c9769f2e 100644
--- a/usr.bin/vi/common/msg.c
+++ b/usr.bin/vi/common/msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msg.c,v 1.9 2002/02/16 21:27:57 millert Exp $ */
+/* $OpenBSD: msg.c,v 1.10 2002/02/19 19:39:39 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -26,17 +26,12 @@ static const char sccsid[] = "@(#)msg.c 10.48 (Berkeley) 9/15/96";
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
#include "common.h"
#include "../vi/vi.h"
@@ -47,15 +42,7 @@ static const char sccsid[] = "@(#)msg.c 10.48 (Berkeley) 9/15/96";
* PUBLIC: void msgq(SCR *, mtype_t, const char *, ...);
*/
void
-#ifdef __STDC__
msgq(SCR *sp, mtype_t mt, const char *fmt, ...)
-#else
-msgq(sp, mt, fmt, va_alist)
- SCR *sp;
- mtype_t mt;
- const char *fmt;
- va_dcl
-#endif
{
#ifndef NL_ARGMAX
#define __NL_ARGMAX 20 /* Set to 9 by System V. */
@@ -275,11 +262,7 @@ retry: FREE_SPACE(sp, bp, blen);
#endif
format: /* Format the arguments into the string. */
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
len = vsnprintf(mp, REM, fmt, ap);
va_end(ap);
if (len >= nlen)
diff --git a/usr.bin/vi/common/util.c b/usr.bin/vi/common/util.c
index 0172e887517..c4d177b2337 100644
--- a/usr.bin/vi/common/util.c
+++ b/usr.bin/vi/common/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.6 2002/02/16 21:27:57 millert Exp $ */
+/* $OpenBSD: util.c,v 1.7 2002/02/19 19:39:39 millert Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -192,11 +192,7 @@ nget_slong(valp, p, endp, base)
}
#ifdef DEBUG
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
/*
* TRACE --
@@ -205,25 +201,14 @@ nget_slong(valp, p, endp, base)
* PUBLIC: void TRACE(SCR *, const char *, ...);
*/
void
-#ifdef __STDC__
TRACE(SCR *sp, const char *fmt, ...)
-#else
-TRACE(sp, fmt, va_alist)
- SCR *sp;
- char *fmt;
- va_dcl
-#endif
{
FILE *tfp;
va_list ap;
if ((tfp = sp->gp->tracefp) == NULL)
return;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
(void)vfprintf(tfp, fmt, ap);
va_end(ap);
diff --git a/usr.bin/vi/ex/ex_print.c b/usr.bin/vi/ex/ex_print.c
index 1091668a0ec..4ff0bc6af34 100644
--- a/usr.bin/vi/ex/ex_print.c
+++ b/usr.bin/vi/ex/ex_print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_print.c,v 1.5 2002/02/16 21:27:57 millert Exp $ */
+/* $OpenBSD: ex_print.c,v 1.6 2002/02/19 19:39:39 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -21,15 +21,10 @@ static const char sccsid[] = "@(#)ex_print.c 10.18 (Berkeley) 5/12/96";
#include <bitstring.h>
#include <ctype.h>
#include <limits.h>
+#include <stdarg.h>
#include <stdio.h>
#include <string.h>
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
#include "../common/common.h"
static int ex_prchars(SCR *, const char *, size_t *, size_t, u_int, int);
@@ -273,14 +268,7 @@ intr: *colp = col;
* PUBLIC: int ex_printf(SCR *, const char *, ...);
*/
int
-#ifdef __STDC__
ex_printf(SCR *sp, const char *fmt, ...)
-#else
-ex_printf(sp, fmt, va_alist)
- SCR *sp;
- const char *fmt;
- va_dcl
-#endif
{
EX_PRIVATE *exp;
va_list ap;
@@ -288,11 +276,7 @@ ex_printf(sp, fmt, va_alist)
exp = EXP(sp);
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
n = vsnprintf(exp->obp + exp->obp_len,
sizeof(exp->obp) - exp->obp_len, fmt, ap);
va_end(ap);
diff --git a/usr.bin/xlint/lint1/emit.c b/usr.bin/xlint/lint1/emit.c
index 18dfaf49a62..29d637efe34 100644
--- a/usr.bin/xlint/lint1/emit.c
+++ b/usr.bin/xlint/lint1/emit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emit.c,v 1.3 2002/02/16 21:27:59 millert Exp $ */
+/* $OpenBSD: emit.c,v 1.4 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: emit.c,v 1.2 1995/07/03 21:24:00 cgd Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: emit.c,v 1.3 2002/02/16 21:27:59 millert Exp $";
+static char rcsid[] = "$OpenBSD: emit.c,v 1.4 2002/02/19 19:39:39 millert Exp $";
#endif
#include <stdio.h>
@@ -164,18 +164,10 @@ outqchar(c)
case '\r':
outchar('r');
break;
-#ifdef __STDC__
case '\v':
-#else
- case '\013':
-#endif
outchar('v');
break;
-#ifdef __STDC__
case '\a':
-#else
- case '\007':
-#endif
outchar('a');
break;
default:
diff --git a/usr.bin/xlint/lint1/err.c b/usr.bin/xlint/lint1/err.c
index 435e9627922..c071db931f6 100644
--- a/usr.bin/xlint/lint1/err.c
+++ b/usr.bin/xlint/lint1/err.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: err.c,v 1.4 2002/02/16 21:27:59 millert Exp $ */
+/* $OpenBSD: err.c,v 1.5 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: err.c,v 1.8 1995/10/02 17:37:00 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: err.c,v 1.4 2002/02/16 21:27:59 millert Exp $";
+static char rcsid[] = "$OpenBSD: err.c,v 1.5 2002/02/19 19:39:39 millert Exp $";
#endif
/* number of errors found */
@@ -43,11 +43,7 @@ int nerr;
int sytxerr;
#include <stdlib.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "lint1.h"
@@ -424,42 +420,22 @@ vwarning(n, ap)
}
void
-#ifdef __STDC__
error(int n, ...)
-#else
-error(n, va_alist)
- int n;
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
va_start(ap, n);
-#else
- va_start(ap);
-#endif
verror(n, ap);
va_end(ap);
}
void
-#ifdef __STDC__
lerror(const char *msg, ...)
-#else
-lerror(msg, va_alist)
- const char *msg;
- va_dcl
-#endif
{
va_list ap;
const char *fn;
-#ifdef __STDC__
va_start(ap, msg);
-#else
- va_start(ap);
-#endif
fn = basename(curr_pos.p_file);
(void)fprintf(stderr, "%s(%d): lint error: ", fn, curr_pos.p_line);
(void)vfprintf(stderr, msg, ap);
@@ -469,42 +445,22 @@ lerror(msg, va_alist)
}
void
-#ifdef __STDC__
warning(int n, ...)
-#else
-warning(n, va_alist)
- int n;
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
va_start(ap, n);
-#else
- va_start(ap);
-#endif
vwarning(n, ap);
va_end(ap);
}
void
-#ifdef __STDC__
message(int n, ...)
-#else
-message(n, va_alist)
- int n;
- va_dcl
-#endif
{
va_list ap;
const char *fn;
-#ifdef __STDC__
va_start(ap, n);
-#else
- va_start(ap);
-#endif
fn = basename(curr_pos.p_file);
(void)printf("%s(%d): ", fn, curr_pos.p_line);
(void)vprintf(msgs[n], ap);
@@ -513,22 +469,12 @@ message(n, va_alist)
}
int
-#ifdef __STDC__
gnuism(int n, ...)
-#else
-gnuism(n, va_alist)
- int n;
- va_dcl
-#endif
{
va_list ap;
int msg;
-#ifdef __STDC__
va_start(ap, n);
-#else
- va_start(ap);
-#endif
if (sflag && !gflag) {
verror(n, ap);
msg = 1;
diff --git a/usr.bin/xlint/lint1/param.h b/usr.bin/xlint/lint1/param.h
index 8de3345d7e5..241cc329048 100644
--- a/usr.bin/xlint/lint1/param.h
+++ b/usr.bin/xlint/lint1/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.7 1997/03/25 17:07:40 rahnds Exp $ */
+/* $OpenBSD: param.h,v 1.8 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: param.h,v 1.6 1996/04/01 21:47:57 mark Exp $ */
/*
@@ -111,23 +111,9 @@ typedef long quad_t;
typedef u_long u_quad_t;
#endif
#endif
-
-
-/*
- * long double only in ANSI C.
- */
-#ifdef __STDC__
typedef long double ldbl_t;
-#else
-typedef double ldbl_t;
-#endif
/*
- * Some traditional compilers are not able to assign structures.
+ * Modern compilers are able to assign structures.
*/
-#ifdef __STDC__
#define STRUCT_ASSIGN(dest, src) (dest) = (src)
-#else
-#define STRUCT_ASSIGN(dest, src) (void)memcpy(&(dest), &(src), \
- sizeof (dest));
-#endif
diff --git a/usr.bin/xlint/lint1/scan.l b/usr.bin/xlint/lint1/scan.l
index 49d2acbbea9..56a01745496 100644
--- a/usr.bin/xlint/lint1/scan.l
+++ b/usr.bin/xlint/lint1/scan.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: scan.l,v 1.4 2002/02/16 21:27:59 millert Exp $ */
+/* $OpenBSD: scan.l,v 1.5 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: scan.l,v 1.8 1995/10/23 13:38:51 jpo Exp $ */
/*
@@ -34,7 +34,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: scan.l,v 1.4 2002/02/16 21:27:59 millert Exp $";
+static char rcsid[] = "$OpenBSD: scan.l,v 1.5 2002/02/19 19:39:39 millert Exp $";
#endif
#include <stdlib.h>
@@ -834,11 +834,7 @@ getescc(d)
if (tflag)
/* \a undefined in traditional C */
warning(81);
-#ifdef __STDC__
return ('\a');
-#else
- return ('\007');
-#endif
case 'b':
return ('\b');
case 'f':
@@ -853,11 +849,7 @@ getescc(d)
if (tflag)
/* \v undefined in traditional C */
warning(264);
-#ifdef __STDC__
return ('\v');
-#else
- return ('\013');
-#endif
case '8': case '9':
/* bad octal digit %c */
warning(77, c);
diff --git a/usr.bin/xlint/lint2/msg.c b/usr.bin/xlint/lint2/msg.c
index b9758026a0e..0ac37f3c53f 100644
--- a/usr.bin/xlint/lint2/msg.c
+++ b/usr.bin/xlint/lint2/msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msg.c,v 1.3 2002/02/16 21:27:59 millert Exp $ */
+/* $OpenBSD: msg.c,v 1.4 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: msg.c,v 1.2 1995/07/03 21:24:56 cgd Exp $ */
/*
@@ -33,17 +33,13 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: msg.c,v 1.3 2002/02/16 21:27:59 millert Exp $";
+static char rcsid[] = "$OpenBSD: msg.c,v 1.4 2002/02/19 19:39:39 millert Exp $";
#endif
#include <string.h>
#include <stdio.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "lint2.h"
@@ -71,25 +67,12 @@ static const char *msgs[] = {
static const char *basename(const char *);
-#ifdef __STDC__
void
msg(int n, ...)
{
-#else
-void
-msg(va_alist)
- va_dcl
- int n;
-{
-#endif
va_list ap;
-#ifdef __STDC__
va_start(ap, n);
-#else
- va_start(ap);
- n = va_arg(ap, int);
-#endif
(void)vprintf(msgs[n], ap);
(void)printf("\n");
diff --git a/usr.bin/xlint/lint2/read.c b/usr.bin/xlint/lint2/read.c
index 8c8e9e407e5..83439799396 100644
--- a/usr.bin/xlint/lint2/read.c
+++ b/usr.bin/xlint/lint2/read.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read.c,v 1.4 2002/02/16 21:27:59 millert Exp $ */
+/* $OpenBSD: read.c,v 1.5 2002/02/19 19:39:39 millert Exp $ */
/* $NetBSD: read.c,v 1.2 1995/07/03 21:24:59 cgd Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: read.c,v 1.4 2002/02/16 21:27:59 millert Exp $";
+static char rcsid[] = "$OpenBSD: read.c,v 1.5 2002/02/19 19:39:39 millert Exp $";
#endif
#include <stdio.h>
@@ -900,11 +900,7 @@ inpqstrg(src, epp)
c = '\t';
break;
case 'v':
-#ifdef __STDC__
c = '\v';
-#else
- c = '\013';
-#endif
break;
case 'b':
c = '\b';
@@ -916,11 +912,7 @@ inpqstrg(src, epp)
c = '\f';
break;
case 'a':
-#ifdef __STDC__
c = '\a';
-#else
- c = '\007';
-#endif
break;
case '\\':
c = '\\';