Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/lpr Unifdef __STDC__. Remove __P(). ANSIfy.
details: https://anonhg.NetBSD.org/src/rev/910fb4d1f38a
branches: trunk
changeset: 534057:910fb4d1f38a
user: wiz <wiz%NetBSD.org@localhost>
date: Sun Jul 14 15:27:58 2002 +0000
description:
Unifdef __STDC__. Remove __P(). ANSIfy.
diffstat:
usr.sbin/lpr/common_source/common.c | 24 ++---
usr.sbin/lpr/common_source/displayq.c | 40 +++------
usr.sbin/lpr/common_source/fatal.c | 22 +----
usr.sbin/lpr/common_source/lp.h | 50 ++++++------
usr.sbin/lpr/common_source/rmjob.c | 33 +++-----
usr.sbin/lpr/common_source/startdaemon.c | 7 +-
usr.sbin/lpr/filters/lpf.c | 14 +--
usr.sbin/lpr/lpc/cmds.c | 118 +++++++++++-------------------
usr.sbin/lpr/lpc/extern.h | 28 +++---
usr.sbin/lpr/lpc/lpc.c | 38 +++------
usr.sbin/lpr/lpc/lpc.h | 4 +-
usr.sbin/lpr/lpd/extern.h | 18 ++--
usr.sbin/lpr/lpd/key.c | 30 +++---
usr.sbin/lpr/lpd/lpd.c | 26 +++---
usr.sbin/lpr/lpd/printjob.c | 63 ++++++----------
usr.sbin/lpr/lpd/recvjob.c | 33 ++------
usr.sbin/lpr/lpd/ttcompat.c | 29 ++-----
usr.sbin/lpr/lpq/lpq.c | 19 ++--
usr.sbin/lpr/lpr/lpr.c | 83 +++++++--------------
usr.sbin/lpr/lprm/lprm.c | 14 +--
usr.sbin/lpr/lptest/lptest.c | 10 +-
usr.sbin/lpr/pac/pac.c | 52 +++++-------
22 files changed, 294 insertions(+), 461 deletions(-)
diffs (truncated from 1875 to 300 lines):
diff -r 76e15e78d2d9 -r 910fb4d1f38a usr.sbin/lpr/common_source/common.c
--- a/usr.sbin/lpr/common_source/common.c Sun Jul 14 14:39:44 2002 +0000
+++ b/usr.sbin/lpr/common_source/common.c Sun Jul 14 15:27:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.22 2001/04/05 13:30:02 wiz Exp $ */
+/* $NetBSD: common.c,v 1.23 2002/07/14 15:27:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: common.c,v 1.22 2001/04/05 13:30:02 wiz Exp $");
+__RCSID("$NetBSD: common.c,v 1.23 2002/07/14 15:27:58 wiz Exp $");
#endif
#endif /* not lint */
@@ -117,7 +117,7 @@
extern uid_t uid, euid;
-static int compar __P((const void *, const void *));
+static int compar(const void *, const void *);
/*
* Create a TCP connection to host "rhost" at port "rport".
@@ -125,9 +125,7 @@
* 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;
@@ -196,8 +194,7 @@
* Returns 0 at EOF or the number of characters read.
*/
int
-getline(cfp)
- FILE *cfp;
+getline(FILE *cfp)
{
int linel = 0, c;
char *lp = line;
@@ -225,8 +222,7 @@
* 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;
@@ -294,8 +290,7 @@
* Compare modification times.
*/
static int
-compar(p1, p2)
- const void *p1, *p2;
+compar(const void *p1, const void *p2)
{
if ((*(struct queue **)p1)->q_time < (*(struct queue **)p2)->q_time)
return(-1);
@@ -309,7 +304,7 @@
* as the remote machine (RM) entry (if it exists).
*/
char *
-checkremote()
+checkremote(void)
{
char lname[NI_MAXHOST], rname[NI_MAXHOST];
struct addrinfo hints, *res, *res0;
@@ -397,8 +392,7 @@
/* sleep n milliseconds */
void
-delay(n)
- int n;
+delay(int n)
{
struct timeval tdelay;
diff -r 76e15e78d2d9 -r 910fb4d1f38a usr.sbin/lpr/common_source/displayq.c
--- a/usr.sbin/lpr/common_source/displayq.c Sun Jul 14 14:39:44 2002 +0000
+++ b/usr.sbin/lpr/common_source/displayq.c Sun Jul 14 15:27:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: displayq.c,v 1.23 2002/06/08 23:37:47 itojun Exp $ */
+/* $NetBSD: displayq.c,v 1.24 2002/07/14 15:27:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)displayq.c 8.4 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: displayq.c,v 1.23 2002/06/08 23:37:47 itojun Exp $");
+__RCSID("$NetBSD: displayq.c,v 1.24 2002/07/14 15:27:58 wiz Exp $");
#endif
#endif /* not lint */
@@ -87,7 +87,7 @@
static const char head0[] = "Rank Owner Job Files";
static const char head1[] = "Total Size\n";
-static void alarmer __P((int));
+static void alarmer(int);
int wait_time = 300; /* time out after 5 minutes by default */
@@ -95,8 +95,7 @@
* Display the current state of the queue. Format = 1 if long format.
*/
void
-displayq(format)
- int format;
+displayq(int format)
{
struct queue *q;
int i, nitems, fd, ret;
@@ -289,8 +288,7 @@
}
static void
-alarmer(s)
- int s;
+alarmer(int s)
{
/* nothing */
}
@@ -299,7 +297,7 @@
* Print a warning message if there is no daemon present.
*/
void
-nodaemon()
+nodaemon(void)
{
if (remote)
printf("\n%s: ", host);
@@ -311,7 +309,7 @@
* Print the header for the short listing format
*/
void
-header()
+header(void)
{
printf(head0);
col = strlen(head0)+1;
@@ -320,8 +318,7 @@
}
void
-inform(cf)
- char *cf;
+inform(char *cf)
{
int j;
FILE *cfp;
@@ -385,8 +382,7 @@
}
int
-inlist(name, file)
- char *name, *file;
+inlist(char *name, char *file)
{
int *r, n;
char **u, *cp;
@@ -411,9 +407,7 @@
}
void
-show(nfile, file, copies)
- char *nfile, *file;
- int copies;
+show(char *nfile, char *file, int copies)
{
if (strcmp(nfile, " ") == 0)
nfile = "(standard input)";
@@ -427,8 +421,7 @@
* Fill the line with blanks to the specified column
*/
void
-blankfill(n)
- int n;
+blankfill(int n)
{
while (col++ < n)
putchar(' ');
@@ -438,9 +431,7 @@
* Give the abbreviated dump of the file names
*/
void
-dump(nfile, file, copies)
- char *nfile, *file;
- int copies;
+dump(char *nfile, char *file, int copies)
{
short n, fill;
struct stat lbuf;
@@ -473,9 +464,7 @@
* Print the long info about the file
*/
void
-ldump(nfile, file, copies)
- char *nfile, *file;
- int copies;
+ldump(char *nfile, char *file, int copies)
{
struct stat lbuf;
@@ -496,8 +485,7 @@
* update col for screen management
*/
void
-prank(n)
- int n;
+prank(int n)
{
char rline[100];
static char *r[] = {
diff -r 76e15e78d2d9 -r 910fb4d1f38a usr.sbin/lpr/common_source/fatal.c
--- a/usr.sbin/lpr/common_source/fatal.c Sun Jul 14 14:39:44 2002 +0000
+++ b/usr.sbin/lpr/common_source/fatal.c Sun Jul 14 15:27:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fatal.c,v 1.2 2000/07/04 20:27:37 matt Exp $ */
+/* $NetBSD: fatal.c,v 1.3 2002/07/14 15:27:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -40,37 +40,23 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fatal.c,v 1.2 2000/07/04 20:27:37 matt Exp $");
+__RCSID("$NetBSD: fatal.c,v 1.3 2002/07/14 15:27:58 wiz Exp $");
#endif /* not lint */
#include <sys/param.h>
#include <sys/dirent.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
#include "lp.h"
void
-#ifdef __STDC__
fatal(const char *msg, ...)
-#else
-fatal(msg, va_alist)
- char *msg;
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
+
va_start(ap, msg);
-#else
- va_start(ap);
-#endif
if (from != host)
(void)printf("%s: ", host);
(void)printf("%s: ", name);
diff -r 76e15e78d2d9 -r 910fb4d1f38a usr.sbin/lpr/common_source/lp.h
--- a/usr.sbin/lpr/common_source/lp.h Sun Jul 14 14:39:44 2002 +0000
+++ b/usr.sbin/lpr/common_source/lp.h Sun Jul 14 15:27:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lp.h,v 1.15 2000/10/11 20:23:52 is Exp $ */
+/* $NetBSD: lp.h,v 1.16 2002/07/14 15:27:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -104,29 +104,29 @@
__BEGIN_DECLS
struct dirent;
-void blankfill __P((int));
-char *checkremote __P((void));
-int chk __P((char *));
-void displayq __P((int));
-void dump __P((char *, char *, int));
-void fatal __P((const char *, ...))
+void blankfill(int);
+char *checkremote(void);
+int chk(char *);
+void displayq(int);
+void dump(char *, char *, int);
+void fatal(const char *, ...)
Home |
Main Index |
Thread Index |
Old Index