blob: f2dadd25c8958d231069231b63e77a10332d5682 [file] [log] [blame]
Eric Andersencc8ed391999-10-05 16:24:54 +00001#include "internal.h"
2#include <stdlib.h>
3#include <string.h>
4#include <stdio.h>
5
Eric Andersen703c62d1999-10-18 21:31:00 +00006extern int
7length_main(int argc, char * * argv)
Eric Andersencc8ed391999-10-05 16:24:54 +00008{
Eric Andersen703c62d1999-10-18 21:31:00 +00009 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 Andersencc8ed391999-10-05 16:24:54 +000015}