summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/lpd/recvjob.c
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2001-06-12 16:38:20 +0000
committergad <gad@FreeBSD.org>2001-06-12 16:38:20 +0000
commitd61428321f0ceb41de748a616b592b50195c51fb (patch)
tree115b09aed7f19dda18dbe2e66eba92a08b0d2441 /usr.sbin/lpr/lpd/recvjob.c
parentb39990d7f9947621a844c7a4936eeb286a471c47 (diff)
downloadFreeBSD-src-d61428321f0ceb41de748a616b592b50195c51fb.zip
FreeBSD-src-d61428321f0ceb41de748a616b592b50195c51fb.tar.gz
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
Diffstat (limited to 'usr.sbin/lpr/lpd/recvjob.c')
-rw-r--r--usr.sbin/lpr/lpd/recvjob.c38
1 files changed, 15 insertions, 23 deletions
diff --git a/usr.sbin/lpr/lpd/recvjob.c b/usr.sbin/lpr/lpd/recvjob.c
index a5a56db..661ad05 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);
OpenPOWER on IntegriCloud