diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2009-07-19 15:47:58 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2009-07-19 15:47:58 +0000 |
commit | 75021ff93db5f528fc8ae5ce9baca50ce6eb6ab5 (patch) | |
tree | 595ae1efde658aba000e8460ef2a60746753218c /usr.bin | |
parent | 82bfe7a48923cf25b755d2bb0216f10af32dc22b (diff) |
remove BUILTIN/SHELL cruft that used to be needed for sh, which is
gone; and killed in csh w. rev. 1.7. ok millert@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/printf/printf.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 01be054439f..d6bbcd66fd5 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printf.c,v 1.15 2009/07/17 17:39:30 martynas Exp $ */ +/* $OpenBSD: printf.c,v 1.16 2009/07/19 15:47:57 martynas Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -30,16 +30,14 @@ */ #ifndef lint -#if !defined(SHELL) && !defined(BUILTIN) char copyright[] = "@(#) Copyright (c) 1989 The Regents of the University of California.\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[] = "$OpenBSD: printf.c,v 1.15 2009/07/17 17:39:30 martynas Exp $"; +static char rcsid[] = "$OpenBSD: printf.c,v 1.16 2009/07/19 15:47:57 martynas Exp $"; #endif /* not lint */ #include <ctype.h> @@ -71,26 +69,6 @@ static char **gargv; #define octtobin(c) ((c) - '0') #define hextobin(c) ((c) >= 'A' && (c) <= 'F' ? c - 'A' + 10 : (c) >= 'a' && (c) <= 'f' ? c - 'a' + 10 : c - '0') -#ifdef SHELL -#define main printfcmd -#include "../../bin/sh/bltin/bltin.h" -#include <stdarg.h> - -static void -warnx(const char *fmt, ...) -{ - - char buf[64]; - va_list ap; - - va_start(ap, fmt); - vsnprintf(buf, sizeof buf, fmt, ap); - va_end(ap); - - error(buf); -} -#endif /* SHELL */ - #define PF(f, func) { \ if (fieldwidth) \ if (precision) \ @@ -104,20 +82,14 @@ warnx(const char *fmt, ...) } int -#ifdef BUILTIN -progprintf(int argc, char *argv[]) -#else main(int argc, char *argv[]) -#endif { char *fmt, *start; int fieldwidth, precision; char convch, nextch; char *format; -#if !defined(SHELL) && !defined(BUILTIN) setlocale (LC_ALL, ""); -#endif /* Need to accept/ignore "--" option. */ if (argc > 1 && strcmp(argv[1], "--") == 0) { |