summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/lpd
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-05-09 22:44:28 +0000
committerjoerg <joerg@FreeBSD.org>1996-05-09 22:44:28 +0000
commit23a9b3568dd67d5645a3e24111156a250e67f006 (patch)
tree9f0cb54101705c00051817581fe4261632528aff /usr.sbin/lpr/lpd
parentc78351df10aca1c5dba5dbed4c4dd74d6d886e64 (diff)
downloadFreeBSD-src-23a9b3568dd67d5645a3e24111156a250e67f006.zip
FreeBSD-src-23a9b3568dd67d5645a3e24111156a250e67f006.tar.gz
Cleanup.
The removed files are no longer needed, they are actually labelled as ``Use only if you are not 4.4BSD''. (Yeah, the ol' crufty printcap.c is really gone!) Properly declare all external objects in files ending in .h, as opposed to embed them into files ending in .c.
Diffstat (limited to 'usr.sbin/lpr/lpd')
-rw-r--r--usr.sbin/lpr/lpd/extern.h3
-rw-r--r--usr.sbin/lpr/lpd/lpd.c2
-rw-r--r--usr.sbin/lpr/lpd/lpdchar.c1
-rw-r--r--usr.sbin/lpr/lpd/printjob.c3
-rw-r--r--usr.sbin/lpr/lpd/recvjob.c1
5 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/lpr/lpd/extern.h b/usr.sbin/lpr/lpd/extern.h
index 64dec12..718bef3 100644
--- a/usr.sbin/lpr/lpd/extern.h
+++ b/usr.sbin/lpr/lpd/extern.h
@@ -35,5 +35,8 @@
#include <sys/cdefs.h>
+extern char scnkey[][HEIGHT]; /* in lpdchar.c */
+extern char fromb[];
+
void printjob __P((void));
void recvjob __P((void));
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index 3b23359..feae8e7 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -79,6 +79,7 @@ static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
#include <sys/stat.h>
#include <sys/file.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
@@ -493,7 +494,6 @@ chkhost(f)
register struct hostent *hp;
register FILE *hostf;
int first = 1;
- extern char *inet_ntoa();
f->sin_port = ntohs(f->sin_port);
if (f->sin_family != AF_INET || f->sin_port >= IPPORT_RESERVED)
diff --git a/usr.sbin/lpr/lpd/lpdchar.c b/usr.sbin/lpr/lpd/lpdchar.c
index c5e11d4..4d24ffd 100644
--- a/usr.sbin/lpr/lpd/lpdchar.c
+++ b/usr.sbin/lpr/lpd/lpdchar.c
@@ -39,6 +39,7 @@ static char sccsid[] = "@(#)lpdchar.c 8.1 (Berkeley) 6/6/93";
* Character set for line printer daemon
*/
#include "lp.local.h"
+#include "extern.h"
#define c_______ 0
#define c______1 01
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index ea2be9f..014ccc3 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -67,6 +67,7 @@ static char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95";
#include <stdlib.h>
#include <sys/ioctl.h>
#include <termios.h>
+#include <time.h>
#include "lp.h"
#include "lp.local.h"
#include "pathnames.h"
@@ -910,7 +911,6 @@ banner(name1, name2)
char *name1, *name2;
{
time_t tvec;
- extern char *ctime();
time(&tvec);
if (!SF && !tof)
@@ -972,7 +972,6 @@ scan_out(scfd, scsp, dlm)
register nchrs, j;
char outbuf[LINELEN+1], *sp, c, cc;
int d, scnhgt;
- extern char scnkey[][HEIGHT]; /* in lpdchar.c */
for (scnhgt = 0; scnhgt++ < HEIGHT+DROP; ) {
strp = &outbuf[0];
diff --git a/usr.sbin/lpr/lpd/recvjob.c b/usr.sbin/lpr/lpd/recvjob.c
index 35f946f..fb307c5 100644
--- a/usr.sbin/lpr/lpd/recvjob.c
+++ b/usr.sbin/lpr/lpd/recvjob.c
@@ -342,7 +342,6 @@ frecverr(msg, va_alist)
va_dcl
#endif
{
- extern char fromb[];
va_list ap;
#if __STDC__
va_start(ap, msg);
OpenPOWER on IntegriCloud