shave bytes
This commit is contained in:
parent
6661d641dd
commit
dc2936c36d
@ -43,17 +43,16 @@ usage: fprintf(stderr,
|
|||||||
|
|
||||||
i = optind;
|
i = optind;
|
||||||
|
|
||||||
do{ c = strtol(argv[i], &argv[i], 10);
|
do{ r = c;
|
||||||
|
c = strtol(argv[i], &argv[i], 10);
|
||||||
if(*argv[i] != '\0' || errno != 0){
|
if(*argv[i] != '\0' || errno != 0){
|
||||||
fprintf(stderr, "%s: argument #%d: Invalid integer\n",
|
fprintf(stderr, "%s: argument #%d: Invalid integer\n",
|
||||||
argv[0], (int)i);
|
argv[0], (int)i);
|
||||||
return EX_USAGE;
|
return EX_USAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(i == optind){
|
if(i == optind)
|
||||||
r = c;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
/* rule enforcement; if a mode isn't permitted and the numbers
|
/* rule enforcement; if a mode isn't permitted and the numbers
|
||||||
* correspond to it, return 1 */
|
* correspond to it, return 1 */
|
||||||
@ -61,10 +60,6 @@ usage: fprintf(stderr,
|
|||||||
|| (!(mode & GREATER) && r > c)
|
|| (!(mode & GREATER) && r > c)
|
||||||
|| (!(mode & LESS) && r < c))
|
|| (!(mode & LESS) && r < c))
|
||||||
return 1;
|
return 1;
|
||||||
else if((mode ^ EQUAL) != 0) /* if the mode isn't ==
|
|
||||||
* make sure the numbers are in order by comparing the
|
|
||||||
* newest number to the last */
|
|
||||||
r = c;
|
|
||||||
}while(++i < argc);
|
}while(++i < argc);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user