diff options
author | Garance A Drosehn <gad@FreeBSD.org> | 2001-06-12 16:38:20 +0000 |
---|---|---|
committer | Garance A Drosehn <gad@FreeBSD.org> | 2001-06-12 16:38:20 +0000 |
commit | ba7a1ad76a812b38f8bddc730e03a14591d997b8 (patch) | |
tree | 115b09aed7f19dda18dbe2e66eba92a08b0d2441 /usr.sbin/lpr/lpd/recvjob.c | |
parent | 0d1b691ed7d4817c696a6915da266ecc4f1b48ae (diff) | |
download | src-ba7a1ad76a812b38f8bddc730e03a14591d997b8.tar.gz src-ba7a1ad76a812b38f8bddc730e03a14591d997b8.zip |
Fix about 90-100 warnings one gets when trying to compile lpr&friends
with BDECFLAGS on, mainly by adding 'const' to parameters in a number
of routine declarations. While I'm at it, ANSI-fy all of the routine
declarations. The resulting object code is exactly the same after
this update as before it, with the exception of one unavoidable
change to lpd.o on freebsd/alpha.
Also added $FreeBSD$ line to lpc/extern.h lpc/lpc.h lptest/lptest.c
Reviewed by: /sbin/md5, and no feedback from freebsd-audit
Notes
Notes:
svn path=/head/; revision=78146
Diffstat (limited to 'usr.sbin/lpr/lpd/recvjob.c')
-rw-r--r-- | usr.sbin/lpr/lpd/recvjob.c | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/usr.sbin/lpr/lpd/recvjob.c b/usr.sbin/lpr/lpd/recvjob.c index a5a56dbe3eeb..661ad053d1c7 100644 --- a/usr.sbin/lpr/lpd/recvjob.c +++ b/usr.sbin/lpr/lpd/recvjob.c @@ -71,21 +71,20 @@ static const char rcsid[] = static char dfname[NAME_MAX]; /* data files */ static int minfree; /* keep at least minfree blocks available */ -static char *sp = ""; +static const char *sp = ""; static char tfname[NAME_MAX]; /* tmp copy of cf before linking */ -static int chksize __P((int)); -static void frecverr __P((const char *, ...)); -static int noresponse __P((void)); -static void rcleanup __P((int)); -static int read_number __P((char *)); -static int readfile __P((struct printer *pp, char *, int)); -static int readjob __P((struct printer *pp)); +static int chksize(int _size); +static void frecverr(const char *_msg, ...); +static int noresponse(void); +static void rcleanup(int _signo); +static int read_number(const char *_fn); +static int readfile(struct printer *_pp, char *_file, int _size); +static int readjob(struct printer *_pp); void -recvjob(printer) - const char *printer; +recvjob(const char *printer) { struct stat stb; int status; @@ -138,8 +137,7 @@ recvjob(printer) * Return the number of jobs successfully transfered. */ static int -readjob(pp) - struct printer *pp; +readjob(struct printer *pp) { register int size; register char *cp; @@ -246,10 +244,7 @@ readjob(pp) * Read files send by lpd and copy them to the spooling directory. */ static int -readfile(pp, file, size) - struct printer *pp; - char *file; - int size; +readfile(struct printer *pp, char *file, int size) { register char *cp; char buf[BUFSIZ]; @@ -301,7 +296,7 @@ readfile(pp, file, size) } static int -noresponse() +noresponse(void) { char resp; @@ -319,8 +314,7 @@ noresponse() * 1 == OK, 0 == Not OK. */ static int -chksize(size) - int size; +chksize(int size) { int spacefree; struct statfs sfb; @@ -337,8 +331,7 @@ chksize(size) } static int -read_number(fn) - char *fn; +read_number(const char *fn) { char lin[80]; register FILE *fp; @@ -357,8 +350,7 @@ read_number(fn) * Remove all the files associated with the current job being transfered. */ static void -rcleanup(signo) - int signo; +rcleanup(int signo __unused) { if (tfname[0] && strchr(tfname, '/') == NULL) (void) unlink(tfname); |