aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/lpr/lpq
diff options
context:
space:
mode:
authorGarance A Drosehn <gad@FreeBSD.org>2001-06-12 16:38:20 +0000
committerGarance A Drosehn <gad@FreeBSD.org>2001-06-12 16:38:20 +0000
commitba7a1ad76a812b38f8bddc730e03a14591d997b8 (patch)
tree115b09aed7f19dda18dbe2e66eba92a08b0d2441 /usr.sbin/lpr/lpq
parent0d1b691ed7d4817c696a6915da266ecc4f1b48ae (diff)
downloadsrc-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/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 67de966673fc..aec55f46bea6 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");