06519c05da
test(1) scans for "operators" linearly in an array using strcmp() to find a match. Since the list of "operators" is fixed, split them into one and two character ones, and ones that start with a `-' and ones they don't. This way we can optimize the compare function to just check for one or two characters. Sort and use bsearch(3). We could have used a single sorted array and bsearch(3), to save some complexity, but I decided to be a bit fancier. |
||
---|---|---|
.. | ||
Makefile | ||
TEST.csh | ||
test.1 | ||
test.c |