Provide our own isdigit macro. saves more than 400 bytes.

This commit is contained in:
Denis Vlasenko
2006-11-27 14:44:18 +00:00
parent d686a045c8
commit 459903bd4e
5 changed files with 13 additions and 11 deletions

View File

@@ -49,9 +49,8 @@ int head_main(int argc, char **argv)
#if !ENABLE_DEBUG_YANK_SUSv2 || ENABLE_FEATURE_FANCY_HEAD
/* Allow legacy syntax of an initial numeric option without -n. */
if ((argc > 1) && (argv[1][0] == '-')
/* && (isdigit)(argv[1][1]) */
&& (((unsigned int)(argv[1][1] - '0')) <= 9)
if (argc > 1 && argv[1][0] == '-'
&& isdigit(argv[1][1])
) {
--argc;
++argv;