(TRUE, FALSE, SHELL_BOOLEAN, TRUTH_OR, TRUTH_AND):
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Aug 2004 23:03:04 +0000 (23:03 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Aug 2004 23:03:04 +0000 (23:03 +0000)
commitd60286964d948da6a8300a0047618e98a8ecf27d
tree30f9cbd00e8f2d51ef469b172c23c02312952f0e
parent09f4eb4ee07d9fa9768126d90899e7edfa845a8e
(TRUE, FALSE, SHELL_BOOLEAN, TRUTH_OR, TRUTH_AND):
Remove.  All uses replaced by C99 boolean primitives.
(TEST_TRUE, TEST_FALSE): New constants, for readability.
(test_unop, binop, unary_operator, binary_operator, two_arguments,
three_arguments, posixtest, expr, term, and, or, is_int, age_of,
one_argument, main): Use bool for booleans.
(advance, unary_advance): Now inline procedures rather than a macros.
(is_int): Renamed from isint, to avoid namespace clash with ctype.h.
(term, and, or): When it's easy, loop instead of recursing.
(term): Avoid integer overflow if there are INT_MAX-3 args (!).
(binary_operator, unary_operator): Simplify by systematically rewriting
true==FOO to FOO (where FOO is a boolean).
(unary_operator): Don't consider a file to be a regular file
merely because its mode&S_IFMT is zero.  Just use S_ISREG.
Remove unnecessary casts.  Remove ifdefs for things like
S_ISSOCK that are no longer needed, since stat-macros.h always
defines them now.
src/test.c