summaryrefslogtreecommitdiffstats
path: root/bin/sh/bltin
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-12-10 15:40:42 +0000
committerjoerg <joerg@FreeBSD.org>1995-12-10 15:40:42 +0000
commitea83bba5aad7ea3d22e1e05e697b152bd0499edd (patch)
treea0f11b5039efb3135f27770ff6fd7ba6c33f476d /bin/sh/bltin
parent301bf81931342bb2bc5bff496f58308fcbc64ab6 (diff)
downloadFreeBSD-src-ea83bba5aad7ea3d22e1e05e697b152bd0499edd.zip
FreeBSD-src-ea83bba5aad7ea3d22e1e05e697b152bd0499edd.tar.gz
Move out some of the shell builtin bogosity from printf's source to
sh's builtin/bltin.h.
Diffstat (limited to 'bin/sh/bltin')
-rw-r--r--bin/sh/bltin/bltin.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/sh/bltin/bltin.h b/bin/sh/bltin/bltin.h
index 6701129..9b9b6c5 100644
--- a/bin/sh/bltin/bltin.h
+++ b/bin/sh/bltin/bltin.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)bltin.h 8.1 (Berkeley) 5/31/93
- * $Id$
+ * $Id: bltin.h,v 1.2 1994/09/24 02:58:26 davidg Exp $
*/
/*
@@ -47,15 +47,24 @@
#include "../mystring.h"
#ifdef SHELL
#include "../output.h"
+#undef stdout
#define stdout out1
+#undef stderr
#define stderr out2
#define printf out1fmt
+#undef putc
#define putc(c, file) outc(c, file)
+#undef putchar
#define putchar(c) out1c(c)
#define fprintf outfmt
#define fputs outstr
#define fflush flushout
#define INITARGS(argv)
+#define warnx(a, b, c) { \
+ char buf[64]; \
+ (void)snprintf(buf, sizeof(buf), a, b, c); \
+ error(buf); \
+}
#else
#undef NULL
#include <stdio.h>
OpenPOWER on IntegriCloud