aboutsummaryrefslogtreecommitdiff
path: root/coreutils/tail.c
diff options
context:
space:
mode:
authorRobert Griebl <griebl@gmx.de>2002-05-27 22:24:53 +0000
committerRobert Griebl <griebl@gmx.de>2002-05-27 22:24:53 +0000
commit53146cc9ec7f3af5a8fa6245bf01c4f9c0fd19b4 (patch)
treec2296e39db1a62fc8d59cf9a64a2f46950b4b63b /coreutils/tail.c
parent8302c43265a9f83baa96b15a6082954526988c8b (diff)
downloadbusybox-w32-53146cc9ec7f3af5a8fa6245bf01c4f9c0fd19b4.tar.gz
busybox-w32-53146cc9ec7f3af5a8fa6245bf01c4f9c0fd19b4.tar.bz2
busybox-w32-53146cc9ec7f3af5a8fa6245bf01c4f9c0fd19b4.zip
Added include for isdigit(); simplified -<num> detection
Diffstat (limited to 'coreutils/tail.c')
-rw-r--r--coreutils/tail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 8201c80a0..024441e73 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -25,6 +25,7 @@
25#include <fcntl.h> 25#include <fcntl.h>
26#include <getopt.h> 26#include <getopt.h>
27#include <string.h> 27#include <string.h>
28#include <ctype.h>
28#include <stdlib.h> 29#include <stdlib.h>
29#include <unistd.h> 30#include <unistd.h>
30#include <sys/types.h> 31#include <sys/types.h>
@@ -68,7 +69,7 @@ int tail_main(int argc, char **argv)
68 char *s, *start, *end, buf[BUFSIZ]; 69 char *s, *start, *end, buf[BUFSIZ];
69 int i, opt; 70 int i, opt;
70 71
71 if (( argc >= 2 ) && ( strlen ( argv [1] ) >= 2 ) && ( argv [1][0] == '-' ) && isdigit ( argv [1][1] )) { 72 if (( argc >= 2 ) && ( argv [1][0] == '-' ) && isdigit ( argv [1][1] )) {
72 count = atoi ( &argv [1][1] ); 73 count = atoi ( &argv [1][1] );
73 optind = 2; 74 optind = 2;
74 } 75 }