projects
/
oweals
/
busybox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Rewrite by Manuel Novoa III, very compact implimentation.
[oweals/busybox.git]
/
coreutils
/
length.c
1
/* vi: set sw=4 ts=4: */
2
#include <stdlib.h>
3
#include <string.h>
4
#include <stdio.h>
5
#include "busybox.h"
6
7
extern int length_main(int argc, char **argv)
8
{
9
if (argc != 2 || **(argv + 1) == '-')
10
show_usage();
11
printf("%lu\n", (long)strlen(argv[1]));
12
return EXIT_SUCCESS;
13
}