1
0

shave bytes

This commit is contained in:
dtb 2023-12-17 23:44:38 -07:00
parent 6661d641dd
commit dc2936c36d

View File

@ -43,17 +43,16 @@ usage: fprintf(stderr,
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){
fprintf(stderr, "%s: argument #%d: Invalid integer\n",
argv[0], (int)i);
return EX_USAGE;
}
if(i == optind){
r = c;
if(i == optind)
continue;
}
/* rule enforcement; if a mode isn't permitted and the numbers
* correspond to it, return 1 */
@ -61,10 +60,6 @@ usage: fprintf(stderr,
|| (!(mode & GREATER) && r > c)
|| (!(mode & LESS) && r < c))
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);
return 0;