summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-06-09 03:56:28 +0000
committermillert <millert@openbsd.org>2002-06-09 03:56:28 +0000
commit984fa694554ec7297562674417a600ffaaa990b7 (patch)
tree34e1a72d61b4bfb68d982a7cf89587c2bc8d407e
parentmore arpcom ->sc_arpcom missing. (diff)
downloadwireguard-openbsd-984fa694554ec7297562674417a600ffaaa990b7.tar.xz
wireguard-openbsd-984fa694554ec7297562674417a600ffaaa990b7.zip
Convert remaining K&R function headers to ANSI
-rw-r--r--usr.sbin/lpr/common_source/common.c17
-rw-r--r--usr.sbin/lpr/common_source/lp.h4
-rw-r--r--usr.sbin/lpr/filters/lpf.c8
-rw-r--r--usr.sbin/lpr/lpr/lpr.c44
-rw-r--r--usr.sbin/lpr/lptest/lptest.c8
5 files changed, 30 insertions, 51 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c
index 90a393305f8..5f6576627d6 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.21 2002/06/09 03:44:50 millert Exp $ */
+/* $OpenBSD: common.c,v 1.22 2002/06/09 03:56:28 millert Exp $ */
/* $NetBSD: common.c,v 1.21 2000/08/09 14:28:50 itojun Exp $ */
/*
@@ -43,7 +43,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.21 2002/06/09 03:44:50 millert Exp $";
+static const char rcsid[] = "$OpenBSD: common.c,v 1.22 2002/06/09 03:56:28 millert Exp $";
#endif
#endif /* not lint */
@@ -126,9 +126,7 @@ static int compar(const void *, const void *);
* Most of this code comes from rcmd.c.
*/
int
-getport(rhost, rport)
- char *rhost;
- int rport;
+getport(char *rhost, int rport)
{
struct addrinfo hints, *res, *r;
u_int timo = 1;
@@ -212,8 +210,7 @@ retryport:
* Returns 0 at EOF or the number of characters read.
*/
int
-getline(cfp)
- FILE *cfp;
+getline(FILE *cfp)
{
int linel = 0;
char *lp = line;
@@ -242,8 +239,7 @@ getline(cfp)
* Return the number of entries and a pointer to the list.
*/
int
-getq(namelist)
- struct queue *(*namelist[]);
+getq(struct queue ***namelist)
{
struct dirent *d;
struct queue *q, **queue;
@@ -311,8 +307,7 @@ errdone:
* Compare modification times.
*/
static int
-compar(v1, v2)
- const void *v1, *v2;
+compar(const void *v1, const void *v2)
{
struct queue *p1 = *(struct queue **)v1;
struct queue *p2 = *(struct queue **)v2;
diff --git a/usr.sbin/lpr/common_source/lp.h b/usr.sbin/lpr/common_source/lp.h
index 2c910aeed4c..98ffc67cca8 100644
--- a/usr.sbin/lpr/common_source/lp.h
+++ b/usr.sbin/lpr/common_source/lp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lp.h,v 1.11 2002/06/09 03:44:50 millert Exp $ */
+/* $OpenBSD: lp.h,v 1.12 2002/06/09 03:56:28 millert Exp $ */
/* $NetBSD: lp.h,v 1.14 2000/04/16 14:43:58 mrg Exp $ */
/*
@@ -136,7 +136,7 @@ void fatal(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
int getline(FILE *);
int getport(char *, int);
-int getq(struct queue *(*[]));
+int getq(struct queue ***);
void header(void);
int inlist(char *, char *);
int iscf(struct dirent *);
diff --git a/usr.sbin/lpr/filters/lpf.c b/usr.sbin/lpr/filters/lpf.c
index 66d5e83adef..720fe295c73 100644
--- a/usr.sbin/lpr/filters/lpf.c
+++ b/usr.sbin/lpr/filters/lpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpf.c,v 1.7 2002/05/20 23:13:50 millert Exp $ */
+/* $OpenBSD: lpf.c,v 1.8 2002/06/09 03:56:29 millert Exp $ */
/* $NetBSD: lpf.c,v 1.8 2000/04/29 00:12:32 abs Exp $ */
/*
@@ -44,7 +44,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)lpf.c 8.1 (Berkeley) 6/6/93";
#else
-static const char rcsid[] = "$OpenBSD: lpf.c,v 1.7 2002/05/20 23:13:50 millert Exp $";
+static const char rcsid[] = "$OpenBSD: lpf.c,v 1.8 2002/06/09 03:56:29 millert Exp $";
#endif
#endif /* not lint */
@@ -80,9 +80,7 @@ char *acctfile; /* accounting information file */
__dead void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char **argv)
{
FILE *p = stdin, *o = stdout;
int i, col;
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c
index fbcd36e70fb..5bf36bbcdb3 100644
--- a/usr.sbin/lpr/lpr/lpr.c
+++ b/usr.sbin/lpr/lpr/lpr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpr.c,v 1.26 2002/06/08 01:53:43 millert Exp $ */
+/* $OpenBSD: lpr.c,v 1.27 2002/06/09 03:56:29 millert Exp $ */
/* $NetBSD: lpr.c,v 1.19 2000/10/11 20:23:52 is Exp $ */
/*
@@ -50,7 +50,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)lpr.c 8.4 (Berkeley) 4/28/95";
#else
-static const char rcsid[] = "$OpenBSD: lpr.c,v 1.26 2002/06/08 01:53:43 millert Exp $";
+static const char rcsid[] = "$OpenBSD: lpr.c,v 1.27 2002/06/09 03:56:29 millert Exp $";
#endif
#endif /* not lint */
@@ -113,14 +113,14 @@ volatile sig_atomic_t gotintr;
static void card(int, const char *);
static void chkprinter(char *);
static void cleanup(int);
-static void copy(int, char []);
+static void copy(int, char *);
static char *itoa(int);
static char *linked(char *);
static char *lmktemp(char *, int, int);
static void mktemps(void);
static int nfile(char *);
static int test(char *);
-static void usage(void);
+static __dead void usage(void);
int
main(int argc, char **argv)
@@ -404,9 +404,7 @@ main(int argc, char **argv)
* Create the file n and copy from file descriptor f.
*/
static void
-copy(f, n)
- int f;
- char n[];
+copy(int f, char *n)
{
int fd, i, nr, nc;
char buf[BUFSIZ];
@@ -446,8 +444,7 @@ copy(f, n)
* path name if successful.
*/
static char *
-linked(file)
- char *file;
+linked(char *file)
{
char *cp;
static char buf[MAXPATHLEN];
@@ -487,9 +484,7 @@ linked(file)
* Put a line into the control file.
*/
static void
-card(c, p2)
- int c;
- const char *p2;
+card(int c, const char *p2)
{
char buf[BUFSIZ];
char *p1 = buf;
@@ -512,8 +507,7 @@ card(c, p2)
* Create a new file in the spool directory.
*/
static int
-nfile(n)
- char *n;
+nfile(char *n)
{
int f;
int oldumask = umask(0); /* should block signals */
@@ -541,8 +535,7 @@ nfile(n)
* Cleanup after interrupts and errors.
*/
static void
-cleanup(signo)
- int signo;
+cleanup(int signo)
{
int i;
@@ -576,8 +569,7 @@ cleanup(signo)
* we should remove it after printing.
*/
static int
-test(file)
- char *file;
+test(char *file)
{
struct exec execb;
int fd;
@@ -637,8 +629,7 @@ bad:
* itoa - integer to string conversion
*/
static char *
-itoa(i)
- int i;
+itoa(int i)
{
static char b[10] = "########";
char *p;
@@ -654,8 +645,7 @@ itoa(i)
* Perform lookup for printer name or abbreviation --
*/
static void
-chkprinter(s)
- char *s;
+chkprinter(char *s)
{
int status;
@@ -681,7 +671,7 @@ chkprinter(s)
* Make the temp files.
*/
static void
-mktemps()
+mktemps(void)
{
int len, fd, n;
char *cp;
@@ -723,9 +713,7 @@ mktemps()
* Make a temp file name.
*/
static char *
-lmktemp(id, num, len)
- char *id;
- int num, len;
+lmktemp(char *id, int num, int len)
{
char *s;
@@ -735,8 +723,8 @@ lmktemp(id, num, len)
return(s);
}
-static void
-usage()
+static __dead void
+usage(void)
{
extern char *__progname;
diff --git a/usr.sbin/lpr/lptest/lptest.c b/usr.sbin/lpr/lptest/lptest.c
index d8806c9d984..fb37bc92f9e 100644
--- a/usr.sbin/lpr/lptest/lptest.c
+++ b/usr.sbin/lpr/lptest/lptest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lptest.c,v 1.5 2002/05/20 23:13:50 millert Exp $ */
+/* $OpenBSD: lptest.c,v 1.6 2002/06/09 03:56:29 millert Exp $ */
/* $NetBSD: lptest.c,v 1.6 1996/12/09 09:57:50 mrg Exp $ */
/*
@@ -45,7 +45,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)lptest.c 8.1 (Berkeley) 6/6/93";
#else
-static const char rcsid[] = "$OpenBSD: lptest.c,v 1.5 2002/05/20 23:13:50 millert Exp $";
+static const char rcsid[] = "$OpenBSD: lptest.c,v 1.6 2002/06/09 03:56:29 millert Exp $";
#endif
#endif /* not lint */
@@ -56,9 +56,7 @@ static const char rcsid[] = "$OpenBSD: lptest.c,v 1.5 2002/05/20 23:13:50 miller
* lptest -- line printer test program (and other devices).
*/
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int len, count;
int i, j, fc, nc;