Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 1 | #include "internal.h" |
| 2 | #include <stdlib.h> |
| 3 | #include <string.h> |
| 4 | #include <stdio.h> |
| 5 | |
Eric Andersen | 703c62d | 1999-10-18 21:31:00 +0000 | [diff] [blame^] | 6 | extern int |
| 7 | length_main(int argc, char * * argv) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 8 | { |
Eric Andersen | 703c62d | 1999-10-18 21:31:00 +0000 | [diff] [blame^] | 9 | if ( **(argv+1) == '-' ) { |
| 10 | fprintf(stderr, "Usage: length string\n"); |
| 11 | exit(FALSE); |
| 12 | } |
| 13 | printf("%d\n", strlen(argv[1])); |
| 14 | return( TRUE); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 15 | } |