summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/lpq
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/lpq
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/lpq')
-rw-r--r--usr.sbin/lpr/lpq/lpq.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/usr.sbin/lpr/lpq/lpq.c b/usr.sbin/lpr/lpq/lpq.c
index 67de966..aec55f4 100644
--- a/usr.sbin/lpr/lpq/lpq.c
+++ b/usr.sbin/lpr/lpq/lpq.c
@@ -77,17 +77,15 @@ int users; /* # of users in user array */
uid_t uid, euid;
-static int ckqueue __P((const struct printer *));
-static void usage __P((void));
-int main __P((int, char **));
+static int ckqueue(const struct printer *_pp);
+static void usage(void);
+int main(int _argc, char **_argv);
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int ch, aflag, lflag;
- char *printer;
+ const char *printer;
struct printer myprinter, *pp = &myprinter;
printer = NULL;
@@ -172,8 +170,7 @@ looperr:
}
static int
-ckqueue(pp)
- const struct printer *pp;
+ckqueue(const struct printer *pp)
{
register struct dirent *d;
DIR *dirp;
@@ -193,7 +190,7 @@ ckqueue(pp)
}
static void
-usage()
+usage(void)
{
fprintf(stderr,
"usage: lpq [-a] [-l] [-Pprinter] [user ...] [job ...]\n");
OpenPOWER on IntegriCloud