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. |
||
---|---|---|
.. | ||
cat | ||
chio | ||
chmod | ||
cp | ||
csh | ||
date | ||
dd | ||
df | ||
domainname | ||
echo | ||
ed | ||
expr | ||
hostname | ||
kill | ||
ksh | ||
ln | ||
ls | ||
mkdir | ||
mt | ||
mv | ||
pax | ||
ps | ||
pwd | ||
rcmd | ||
rcp | ||
rm | ||
rmdir | ||
sh | ||
sleep | ||
stty | ||
sync | ||
systrace | ||
test | ||
Makefile | ||
Makefile.inc |