projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More stuff.
[oweals/busybox.git]
/
length.c
diff --git
a/length.c
b/length.c
index 284bbfdf96ac29b40ad69f871ad25b54bed292ad..46242b529eb7f5d9b37092b37c948f15179cf50e 100644
(file)
--- a/
length.c
+++ b/
length.c
@@
-3,11
+3,12
@@
#include <string.h>
#include <stdio.h>
#include <string.h>
#include <stdio.h>
-const char length_usage[] = "length string";
-
-int
-length_main(struct FileInfo * i, int argc, char * * argv)
+extern int
+length_main(int argc, char * * argv)
{
{
- printf("%d\n", strlen(argv[1]));
- return 0;
+ if ( **(argv+1) == '-' ) {
+ usage("length string\n");
+ }
+ printf("%d\n", strlen(argv[1]));
+ return( TRUE);
}
}