www.usr.com/support/gpl/USR9108_release1.5.tar.gz
[bcm963xx.git] / userapps / opensource / busybox / coreutils / length.c
1 /* vi: set sw=4 ts=4: */
2
3 /* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */
4
5 #include <stdlib.h>
6 #include <string.h>
7 #include <stdio.h>
8 #include "busybox.h"
9
10 extern int length_main(int argc, char **argv)
11 {
12         if ((argc != 2) ||  (**(++argv) == '-')) {
13             bb_show_usage();
14         }
15
16         bb_printf("%lu\n", (unsigned long)strlen(*argv));
17
18         bb_fflush_stdout_and_exit(EXIT_SUCCESS);
19 }