Rev | Line | |
---|
[821] | 1 | /* vi: set sw=4 ts=4: */
|
---|
| 2 |
|
---|
| 3 | /* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */
|
---|
| 4 |
|
---|
[1765] | 5 | #include "libbb.h"
|
---|
[821] | 6 |
|
---|
[1765] | 7 | /* This is a NOFORK applet. Be very careful! */
|
---|
| 8 |
|
---|
| 9 | int length_main(int argc, char **argv);
|
---|
[821] | 10 | int length_main(int argc, char **argv)
|
---|
| 11 | {
|
---|
[1765] | 12 | if ((argc != 2) || (**(++argv) == '-')) {
|
---|
| 13 | bb_show_usage();
|
---|
[821] | 14 | }
|
---|
| 15 |
|
---|
[1765] | 16 | printf("%u\n", (unsigned)strlen(*argv));
|
---|
[821] | 17 |
|
---|
[1765] | 18 | return fflush(stdout);
|
---|
[821] | 19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.