Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/lpr static, __printflike, __dead
details: https://anonhg.NetBSD.org/src/rev/fd29c2e1336a
branches: trunk
changeset: 769050:fd29c2e1336a
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Aug 30 19:27:37 2011 +0000
description:
static, __printflike, __dead
diffstat:
usr.sbin/lpr/common_source/lp.h | 7 +++----
usr.sbin/lpr/filters/lpf.c | 35 +++++++++++++++++------------------
usr.sbin/lpr/lpc/extern.h | 4 ++--
usr.sbin/lpr/lpc/lpc.c | 8 ++++----
usr.sbin/lpr/lpd/extern.h | 4 ++--
usr.sbin/lpr/lpd/lpd.c | 8 ++++----
usr.sbin/lpr/lpd/printjob.c | 6 +++---
usr.sbin/lpr/lpd/recvjob.c | 7 +++----
usr.sbin/lpr/lpr/lpr.c | 6 +++---
usr.sbin/lpr/pac/pac.c | 7 +++----
10 files changed, 44 insertions(+), 48 deletions(-)
diffs (300 lines):
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/common_source/lp.h
--- a/usr.sbin/lpr/common_source/lp.h Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/common_source/lp.h Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lp.h,v 1.24 2009/07/13 19:05:41 roy Exp $ */
+/* $NetBSD: lp.h,v 1.25 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -105,8 +105,7 @@
int chk(const char *);
void displayq(int);
void dump(const char *, const char *, int);
-void fatal(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+void fatal(const char *, ...) __dead __printflike(1, 2);
size_t get_line(FILE *);
const char *gethost(const char *);
int getport(const char *);
@@ -121,7 +120,7 @@
int lockchk(const char *);
void prank(int);
void process(const char *);
-void rmjob(void);
+void rmjob(void) __dead;
void rmremote(void);
void show(const char *, const char *, int);
int startdaemon(const char *);
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/filters/lpf.c
--- a/usr.sbin/lpr/filters/lpf.c Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/filters/lpf.c Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lpf.c,v 1.13 2008/07/21 13:36:58 lukem Exp $ */
+/* $NetBSD: lpf.c,v 1.14 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -35,7 +35,7 @@
#if 0
static char sccsid[] = "@(#)lpf.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lpf.c,v 1.13 2008/07/21 13:36:58 lukem Exp $");
+__RCSID("$NetBSD: lpf.c,v 1.14 2011/08/30 19:27:37 joerg Exp $");
#endif
#endif /* not lint */
@@ -57,22 +57,21 @@
#define MAXWIDTH 132
#define MAXREP 10
-char buf[MAXREP][MAXWIDTH];
-int maxcol[MAXREP] = {-1};
-int lineno;
-int width = 132; /* default line length */
-int length = 66; /* page length */
-int indent; /* indentation length */
-int npages = 1;
-int literal; /* print control characters */
-char *name; /* user's login name */
-char *host; /* user's machine name */
-char *acctfile; /* accounting information file */
-int crnl; /* \n -> \r\n */
-int need_cr;
+static char buf[MAXREP][MAXWIDTH];
+static int maxcol[MAXREP] = {-1};
+static int lineno;
+static int width = 132; /* default line length */
+static int length = 66; /* page length */
+static int indent; /* indentation length */
+static int npages = 1;
+static int literal; /* print control characters */
+static char *name; /* user's login name */
+static char *host; /* user's machine name */
+static char *acctfile; /* accounting information file */
+static int crnl; /* \n -> \r\n */
+static int need_cr;
-int main(int, char *[]);
-void usage(void);
+__dead static void usage(void);
int
main(int argc, char *argv[])
@@ -226,7 +225,7 @@
exit(0);
}
-void
+static void
usage(void)
{
fprintf(stderr,
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/lpc/extern.h
--- a/usr.sbin/lpr/lpc/extern.h Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/lpc/extern.h Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.5 2003/08/07 11:25:27 agc Exp $ */
+/* $NetBSD: extern.h,v 1.6 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -43,7 +43,7 @@
void down(int, char **);
void enable(int, char **);
void help(int, char **);
-void quit(int, char **);
+void quit(int, char **) __dead;
void restart(int, char **);
void startcmd(int, char **);
void status(int, char **);
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/lpc/lpc.c
--- a/usr.sbin/lpr/lpc/lpc.c Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/lpc/lpc.c Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lpc.c,v 1.25 2009/01/18 09:57:26 lukem Exp $ */
+/* $NetBSD: lpc.c,v 1.26 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)lpc.c 8.3 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: lpc.c,v 1.25 2009/01/18 09:57:26 lukem Exp $");
+__RCSID("$NetBSD: lpc.c,v 1.26 2011/08/30 19:27:37 joerg Exp $");
#endif
#endif /* not lint */
@@ -82,9 +82,9 @@
HistEvent he;
EditLine *elptr;
-static void cmdscanner(int);
+__dead static void cmdscanner(int);
static struct cmd *getcmd(const char *);
-static void intr(int);
+__dead static void intr(int);
static void makeargv(void);
static int ingroup(const char *);
int main(int, char *p[]);
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/lpd/extern.h
--- a/usr.sbin/lpr/lpd/extern.h Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/lpd/extern.h Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.11 2003/08/07 11:25:27 agc Exp $ */
+/* $NetBSD: extern.h,v 1.12 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -52,7 +52,7 @@
int ksearch(char ***, struct info *);
int msearch(char ***, struct info *);
-void printjob(void);
+void printjob(void) __dead;
void recvjob(void);
void sttyclearflags(struct termios *tp, int flags);
void sttysetflags(struct termios *tp, int flags);
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/lpd/lpd.c
--- a/usr.sbin/lpr/lpd/lpd.c Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/lpd/lpd.c Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lpd.c,v 1.55 2008/07/21 13:36:58 lukem Exp $ */
+/* $NetBSD: lpd.c,v 1.56 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1983, 1993, 1994
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95";
#else
-__RCSID("$NetBSD: lpd.c,v 1.55 2008/07/21 13:36:58 lukem Exp $");
+__RCSID("$NetBSD: lpd.c,v 1.56 2011/08/30 19:27:37 joerg Exp $");
#endif
#endif /* not lint */
@@ -127,11 +127,11 @@
int main(int, char **);
static void reapchild(int);
-static void mcleanup(int);
+__dead static void mcleanup(int);
static void doit(void);
static void startup(void);
static void chkhost(struct sockaddr *, int);
-static void usage(void);
+__dead static void usage(void);
static struct pollfd *socksetup(int, int, const char *, int *);
uid_t uid, euid;
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/lpd/printjob.c
--- a/usr.sbin/lpr/lpd/printjob.c Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/lpd/printjob.c Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: printjob.c,v 1.55 2009/07/13 19:05:42 roy Exp $ */
+/* $NetBSD: printjob.c,v 1.56 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95";
#else
-__RCSID("$NetBSD: printjob.c,v 1.55 2009/07/13 19:05:42 roy Exp $");
+__RCSID("$NetBSD: printjob.c,v 1.56 2011/08/30 19:27:37 joerg Exp $");
#endif
#endif /* not lint */
@@ -117,7 +117,7 @@
static char tempremote[] = "remoteXXXXXX"; /* file name for remote filter */
static char width[10] = "-w"; /* page width in static characters */
-static void abortpr(int);
+__dead static void abortpr(int);
static void banner(char *, char *);
static int dofork(int);
static int dropit(int);
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/lpd/recvjob.c
--- a/usr.sbin/lpr/lpd/recvjob.c Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/lpd/recvjob.c Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: recvjob.c,v 1.22 2009/01/18 09:57:26 lukem Exp $ */
+/* $NetBSD: recvjob.c,v 1.23 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95";
#else
-__RCSID("$NetBSD: recvjob.c,v 1.22 2009/01/18 09:57:26 lukem Exp $");
+__RCSID("$NetBSD: recvjob.c,v 1.23 2011/08/30 19:27:37 joerg Exp $");
#endif
#endif /* not lint */
@@ -74,8 +74,7 @@
static char tfname[NAME_MAX]; /* tmp copy of cf before linking */
static int chksize(int);
-static void frecverr(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+static void frecverr(const char *, ...) __dead __printflike(1, 2);
static int noresponse(void);
static void rcleanup(int);
static int read_number(const char *);
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/lpr/lpr.c
--- a/usr.sbin/lpr/lpr/lpr.c Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/lpr/lpr.c Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lpr.c,v 1.44 2011/01/20 15:48:11 ginsbach Exp $ */
+/* $NetBSD: lpr.c,v 1.45 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1983, 1989, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)lpr.c 8.4 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: lpr.c,v 1.44 2011/01/20 15:48:11 ginsbach Exp $");
+__RCSID("$NetBSD: lpr.c,v 1.45 2011/08/30 19:27:37 joerg Exp $");
#endif
#endif /* not lint */
@@ -104,7 +104,7 @@
static void card(int, const char *);
static void chkprinter(const char *);
-static void cleanup(int);
+static void cleanup(int) __dead;
static void copy(int, const char *);
static char *itoa(int);
static const char *linked(const char *);
diff -r 9cec15126d14 -r fd29c2e1336a usr.sbin/lpr/pac/pac.c
--- a/usr.sbin/lpr/pac/pac.c Tue Aug 30 19:20:20 2011 +0000
+++ b/usr.sbin/lpr/pac/pac.c Tue Aug 30 19:27:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pac.c,v 1.22 2008/07/21 13:36:58 lukem Exp $ */
+/* $NetBSD: pac.c,v 1.23 2011/08/30 19:27:37 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)pac.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: pac.c,v 1.22 2008/07/21 13:36:58 lukem Exp $");
+__RCSID("$NetBSD: pac.c,v 1.23 2011/08/30 19:27:37 joerg Exp $");
#endif
#endif /* not lint */
@@ -98,8 +98,7 @@
static struct hent *lookup(const char *);
static int qucmp(const void *, const void *);
static void rewrite(void);
-static void usage(void);
-int main(int, char * const []);
+static void usage(void) __dead;
int
main(int argc, char *const argv[])
Home |
Main Index |
Thread Index |
Old Index