blob: 1ab4e3a58d0bcf639f1cf3cdbffb0f6080607849 [file] [log] [blame]
Erik Andersene49d5ec2000-02-08 19:58:47 +00001/* vi: set sw=4 ts=4: */
Eric Andersen3570a342000-09-25 21:45:58 +00002#include "busybox.h"
Eric Andersencc8ed391999-10-05 16:24:54 +00003#include <stdlib.h>
4#include <string.h>
5#include <stdio.h>
6
Erik Andersene49d5ec2000-02-08 19:58:47 +00007extern int length_main(int argc, char **argv)
Eric Andersencc8ed391999-10-05 16:24:54 +00008{
Matt Kraai3bd8bd82000-07-14 23:28:47 +00009 if (argc != 2 || **(argv + 1) == '-')
10 usage(length_usage);
Erik Andersen1d1d9502000-04-21 01:26:49 +000011 printf("%lu\n", (long)strlen(argv[1]));
Matt Kraai3e856ce2000-12-01 02:55:13 +000012 return EXIT_SUCCESS;
Eric Andersencc8ed391999-10-05 16:24:54 +000013}