aboutsummaryrefslogtreecommitdiff
path: root/coreutils/printf.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>1999-10-18 22:28:26 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>1999-10-18 22:28:26 +0000
commit0d2bfbda7eff5105f000a216789b68fed8fae031 (patch)
treeb951f34000ebdef0491eecd9386e5ea3e535171a /coreutils/printf.c
parentb45ce89974024bd2dbb2f0d5ec0a8d42cc79d030 (diff)
downloadbusybox-w32-0d2bfbda7eff5105f000a216789b68fed8fae031.tar.gz
busybox-w32-0d2bfbda7eff5105f000a216789b68fed8fae031.tar.bz2
busybox-w32-0d2bfbda7eff5105f000a216789b68fed8fae031.zip
More stuff.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@34 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/printf.c')
-rw-r--r--coreutils/printf.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c
index e79843c80..4d4465943 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -1,8 +1,3 @@
1// I may still need some more cleaning...fix my error checking
2
3#include "internal.h"
4#ifdef BB_PRINTF
5
6/* printf - format and print data 1/* printf - format and print data
7 Copyright (C) 90, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. 2 Copyright (C) 90, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
8 3
@@ -51,6 +46,7 @@
51 46
52// 19990508 Busy Boxed! Dave Cinege 47// 19990508 Busy Boxed! Dave Cinege
53 48
49#include "internal.h"
54#include <unistd.h> 50#include <unistd.h>
55#include <stdio.h> 51#include <stdio.h>
56#include <sys/types.h> 52#include <sys/types.h>
@@ -140,15 +136,18 @@ static void verify __P ((char *s, char *end));
140/* The value to return to the calling program. */ 136/* The value to return to the calling program. */
141static int exit_status; 137static int exit_status;
142 138
143const char printf_usage[] = "Usage: printf format [argument...]\n"; 139const char printf_usage[] = "printf format [argument...]\n";
144 140
145int 141int
146printf_main(struct FileInfo * i, int argc, char * * argv) 142printf_main(int argc, char** argv)
147{ 143{
148 char *format; 144 char *format;
149 int args_used; 145 int args_used;
150 146
151 exit_status = 0; 147 exit_status = 0;
148 if ( **(argv+1) == '-' ) {
149 usage (printf_usage);
150 }
152 151
153 format = argv[1]; 152 format = argv[1];
154 argc -= 2; 153 argc -= 2;
@@ -528,4 +527,3 @@ verify (char *s, char *end)
528 } 527 }
529} 528}
530 529
531#endif