Subject: bin/17520: various lpd source nits
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ginsbach@cray.com>
List: netbsd-bugs
Date: 07/08/2002 09:28:33
>Number:         17520
>Category:       bin
>Synopsis:       various lpd source nits
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 08 07:29:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Brian Ginsbach
>Release:        NetBSD 1.5.2, current
>Organization:
Cray Inc.
>Environment:
System: NetBSD nbtest.cray.com 1.5.2 NetBSD 1.5.2 (NBTEST) #1: Wed Feb 20 03:38:32 CST 2002 ginsbach@nbtest.cray.com:/usr/src/sys/arch/i386/compile/NBTEST i386


>Description:
	This fixes various little problems in the lpd source.

	lpd.c		bogus 'c' option in getopt option string

	printjob.c	spelling "prstatic inter" -> "printer"
			finish ANSIfication

	recvjob.c	finish ANSIfication

>How-To-Repeat:
	By inspection.

>Fix:
Index: lpd.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/lpr/lpd/lpd.c,v
retrieving revision 1.33
diff -u -r1.33 lpd.c
--- lpd.c	2002/01/21 14:42:29	1.33
+++ lpd.c	2002/07/08 14:26:04
@@ -154,7 +154,7 @@
 	name = argv[0];
 
 	errs = 0;
-	while ((i = getopt(argc, argv, "b:cdln:srw:W")) != -1)
+	while ((i = getopt(argc, argv, "b:dln:srw:W")) != -1)
 		switch (i) {
 		case 'b':
 			if (blist_addrs >= blist_size) {
Index: printjob.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/lpr/lpd/printjob.c,v
retrieving revision 1.32
diff -u -r1.32 printjob.c
--- printjob.c	2002/06/08 23:40:12	1.32
+++ printjob.c	2002/07/08 14:26:04
@@ -101,7 +101,7 @@
 static int	lfd;		/* lock file descriptor */
 static int	ofd;		/* output filter file descriptor */
 static int	ofilter;	/* id of output filter, if any */
-static int	pfd;		/* prstatic inter file descriptor */
+static int	pfd;		/* printer file descriptor */
 static int	pid;		/* pid of lpd process */
 static int	prchild;	/* id of pr process */
 static char	title[80];	/* ``pr'' title */
@@ -1040,8 +1040,7 @@
 }
 
 static int
-dropit(c)
-	int c;
+dropit(int c)
 {
 	switch(c) {
 
@@ -1189,8 +1188,7 @@
  * Kill child processes to abort current job.
  */
 static void
-abortpr(signo)
-	int signo;
+abortpr(int signo)
 {
 	(void)unlink(tempfile);
 	kill(0, SIGINT);
Index: recvjob.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/lpr/lpd/recvjob.c,v
retrieving revision 1.14
diff -u -r1.14 recvjob.c
--- recvjob.c	2001/12/04 22:52:44	1.14
+++ recvjob.c	2002/07/08 14:26:04
@@ -302,8 +302,7 @@
 }
 
 static int
-read_number(fn)
-	char *fn;
+read_number(char *fn)
 {
 	char lin[80];
 	FILE *fp;
>Release-Note:
>Audit-Trail:
>Unformatted: