diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-19 19:39:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-19 19:39:42 +0000 |
commit | 3923126b85f9e8a77cab9a41b5a62125acd5b4cd (patch) | |
tree | 1a8b19c5db03f8c989fc8228811837b182feb7a3 /usr.sbin/lpr | |
parent | cc03bdb70090357d2393b6ec82e3cde4d5ce5edd (diff) |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r-- | usr.sbin/lpr/common_source/common.c | 22 | ||||
-rw-r--r-- | usr.sbin/lpr/lpd/printjob.c | 21 | ||||
-rw-r--r-- | usr.sbin/lpr/lpd/recvjob.c | 22 |
3 files changed, 11 insertions, 54 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c index 48b4f45eea0..1a97a90fe70 100644 --- a/usr.sbin/lpr/common_source/common.c +++ b/usr.sbin/lpr/common_source/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.15 2002/02/16 21:28:03 millert Exp $ */ +/* $OpenBSD: common.c,v 1.16 2002/02/19 19:39:40 millert Exp $ */ /* * Copyright (c) 1983, 1993 @@ -42,7 +42,7 @@ #if 0 static const char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95"; #else -static const char rcsid[] = "$OpenBSD: common.c,v 1.15 2002/02/16 21:28:03 millert Exp $"; +static const char rcsid[] = "$OpenBSD: common.c,v 1.16 2002/02/19 19:39:40 millert Exp $"; #endif #endif /* not lint */ @@ -61,6 +61,7 @@ static const char rcsid[] = "$OpenBSD: common.c,v 1.15 2002/02/16 21:28:03 mille #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <stdarg.h> #include "lp.h" #include "pathnames.h" @@ -405,28 +406,13 @@ delay(n) (void) select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tdelay); } -#ifdef __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif - void -#ifdef __STDC__ fatal(const char *msg, ...) -#else -fatal(msg, va_alist) - char *msg; - va_dcl -#endif { extern char *__progname; va_list ap; -#ifdef __STDC__ + va_start(ap, msg); -#else - va_start(ap); -#endif if (from != host) (void)printf("%s: ", host); (void)printf("%s: ", __progname); diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index fb10a6dbcae..68b48b5f3e4 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printjob.c,v 1.30 2002/02/16 21:28:04 millert Exp $ */ +/* $OpenBSD: printjob.c,v 1.31 2002/02/19 19:39:40 millert Exp $ */ /* $NetBSD: printjob.c,v 1.9.4.3 1996/07/12 22:31:39 jtc Exp $ */ /* @@ -70,6 +70,7 @@ static const char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95"; #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <stdarg.h> #include <ctype.h> #include "lp.h" #include "lp.local.h" @@ -1536,30 +1537,14 @@ setty() return; } -#ifdef __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif - static void -#ifdef __STDC__ pstatus(const char *msg, ...) -#else -pstatus(msg, va_alist) - char *msg; - va_dcl -#endif { int fd; char buf[BUFSIZ]; va_list ap; -#ifdef __STDC__ - va_start(ap, msg); -#else - va_start(ap); -#endif + va_start(ap, msg); umask(0); fd = open(ST, O_WRONLY|O_CREAT, 0664); if (fd < 0 || flock(fd, LOCK_EX) < 0) { diff --git a/usr.sbin/lpr/lpd/recvjob.c b/usr.sbin/lpr/lpd/recvjob.c index 71021f5114b..251af2c92d0 100644 --- a/usr.sbin/lpr/lpd/recvjob.c +++ b/usr.sbin/lpr/lpd/recvjob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: recvjob.c,v 1.18 2002/02/16 21:28:04 millert Exp $ */ +/* $OpenBSD: recvjob.c,v 1.19 2002/02/19 19:39:40 millert Exp $ */ /* * Copyright (c) 1983, 1993 @@ -44,7 +44,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95"; #else -static const char rcsid[] = "$OpenBSD: recvjob.c,v 1.18 2002/02/16 21:28:04 millert Exp $"; +static const char rcsid[] = "$OpenBSD: recvjob.c,v 1.19 2002/02/19 19:39:40 millert Exp $"; #endif #endif /* not lint */ @@ -65,6 +65,7 @@ static const char rcsid[] = "$OpenBSD: recvjob.c,v 1.18 2002/02/16 21:28:04 mill #include <errno.h> #include <stdlib.h> #include <string.h> +#include <stdarg.h> #include "lp.h" #include "lp.local.h" #include "extern.h" @@ -343,28 +344,13 @@ rcleanup(signo) errno = save_errno; } -#ifdef __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif - static void -#ifdef __STDC__ frecverr(const char *msg, ...) -#else -frecverr(msg, va_alist) - char *msg; - va_dcl -#endif { extern char fromb[]; va_list ap; -#ifdef __STDC__ + va_start(ap, msg); -#else - va_start(ap); -#endif rcleanup(0); syslog(LOG_ERR, "%s", fromb); vsyslog(LOG_ERR, msg, ap); |