summaryrefslogtreecommitdiff
path: root/usr.bin/printf/printf.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1997-07-04 21:25:16 +0000
committerchristos <christos@NetBSD.org>1997-07-04 21:25:16 +0000
commitabc99479bad0ddd2a7cf15f6e5c84a2cc9b404f0 (patch)
tree51bae754251a36652125ba3908073615dac6f26b /usr.bin/printf/printf.c
parent8ea378c6accb040768ec5c37c36b358dc8e7875c (diff)
Fix compiler warnings.
Diffstat (limited to 'usr.bin/printf/printf.c')
-rw-r--r--usr.bin/printf/printf.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index 07e24737642..bbeeba2ba94 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: printf.c,v 1.15 1997/01/14 19:20:09 cgd Exp $ */
+/* $NetBSD: printf.c,v 1.16 1997/07/04 21:25:17 christos Exp $ */
/*
* Copyright (c) 1989 The Regents of the University of California.
@@ -33,17 +33,21 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if !defined(SHELL) && !defined(BUILTIN)
-char copyright[] =
+__COPYRIGHT(
"@(#) Copyright (c) 1989 The Regents of the University of California.\n\
- All rights reserved.\n";
+ All rights reserved.\n");
#endif
#endif /* not lint */
#ifndef lint
-/*static char sccsid[] = "from: @(#)printf.c 5.9 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$NetBSD: printf.c,v 1.15 1997/01/14 19:20:09 cgd Exp $";
+#if 0
+static char sccsid[] = "@(#)printf.c 5.9 (Berkeley) 6/1/90";
+#else
+__RCSID("$NetBSD: printf.c,v 1.16 1997/07/04 21:25:17 christos Exp $");
+#endif
#endif /* not lint */
#include <ctype.h>
@@ -71,6 +75,12 @@ static void usage __P((void));
static int rval;
static char **gargv;
+#ifdef BUILTIN
+int progprintf __P((int, char **));
+#else
+int main __P((int, char **));
+#endif
+
#define isodigit(c) ((c) >= '0' && (c) <= '7')
#define octtobin(c) ((c) - '0')
#define hextobin(c) ((c) >= 'A' && (c) <= 'F' ? c - 'A' + 10 : (c) >= 'a' && (c) <= 'f' ? c - 'a' + 10 : c - '0')
@@ -85,6 +95,8 @@ static char **gargv;
#include <vararg.h>
#endif
+static void warnx __P((const char *fmt, ...));
+
static void
#ifdef __STDC__
warnx(const char *fmt, ...)