diff options
author | Eric Andersen | 1999-10-18 22:28:26 +0000 |
---|---|---|
committer | Eric Andersen | 1999-10-18 22:28:26 +0000 |
commit | b0e9a709ba1ae1724d413a77f5b67b1a3e6c6cb7 (patch) | |
tree | b951f34000ebdef0491eecd9386e5ea3e535171a /coreutils/printf.c | |
parent | 703c62da63aa31d665a8215f373b26e4b54f1bf4 (diff) | |
download | busybox-b0e9a709ba1ae1724d413a77f5b67b1a3e6c6cb7.zip busybox-b0e9a709ba1ae1724d413a77f5b67b1a3e6c6cb7.tar.gz |
More stuff.
-Erik
Diffstat (limited to 'coreutils/printf.c')
-rw-r--r-- | coreutils/printf.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c index e79843c..4d44659 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -1,8 +1,3 @@ -// I may still need some more cleaning...fix my error checking - -#include "internal.h" -#ifdef BB_PRINTF - /* printf - format and print data Copyright (C) 90, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. @@ -51,6 +46,7 @@ // 19990508 Busy Boxed! Dave Cinege +#include "internal.h" #include <unistd.h> #include <stdio.h> #include <sys/types.h> @@ -140,15 +136,18 @@ static void verify __P ((char *s, char *end)); /* The value to return to the calling program. */ static int exit_status; -const char printf_usage[] = "Usage: printf format [argument...]\n"; +const char printf_usage[] = "printf format [argument...]\n"; int -printf_main(struct FileInfo * i, int argc, char * * argv) +printf_main(int argc, char** argv) { char *format; int args_used; exit_status = 0; + if ( **(argv+1) == '-' ) { + usage (printf_usage); + } format = argv[1]; argc -= 2; @@ -528,4 +527,3 @@ verify (char *s, char *end) } } -#endif |