ndk-busybox/coreutils/length.c
Eric Andersen cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
header file usage before the 0.49 release.  To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
 -Erik
2001-02-20 06:14:08 +00:00

14 lines
274 B
C

/* vi: set sw=4 ts=4: */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "busybox.h"
extern int length_main(int argc, char **argv)
{
if (argc != 2 || **(argv + 1) == '-')
show_usage();
printf("%lu\n", (long)strlen(argv[1]));
return EXIT_SUCCESS;
}