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) == '-' ) { |
Eric Andersen | b0e9a70 | 1999-10-18 22:28:26 +0000 | [diff] [blame] | 10 | usage("length string\n"); |
Eric Andersen | 703c62d | 1999-10-18 21:31:00 +0000 | [diff] [blame] | 11 | } |
| 12 | printf("%d\n", strlen(argv[1])); |
| 13 | return( TRUE); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 14 | } |