projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove #ifdef __STDC__ junk. We don't do K&R round these parts,
[oweals/busybox.git]
/
coreutils
/
length.c
diff --git
a/coreutils/length.c
b/coreutils/length.c
index 284bbfdf96ac29b40ad69f871ad25b54bed292ad..1ab4e3a58d0bcf639f1cf3cdbffb0f6080607849 100644
(file)
--- a/
coreutils/length.c
+++ b/
coreutils/length.c
@@
-1,13
+1,13
@@
-#include "internal.h"
+/* vi: set sw=4 ts=4: */
+#include "busybox.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.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 (argc != 2 || **(argv + 1) == '-')
+ usage(length_usage);
+ printf("%lu\n", (long)strlen(argv[1]));
+ return EXIT_SUCCESS;
}
}