diff options
author | Jim Meyering <jim@meyering.net> | 2005-04-07 17:14:14 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-04-07 17:14:14 +0000 |
commit | d7361052217cd93eda18d13e065b2a5931981cef (patch) | |
tree | 791aa002abb6bae615def64321619cd465a20729 /src | |
parent | 6d2f006d8dca7744fa5a714a56918bc9e2e72208 (diff) | |
download | coreutils-d7361052217cd93eda18d13e065b2a5931981cef.tar.xz |
(binop): Move function definition to precede first use so we can...
(binop): ...remove prototype.
Diffstat (limited to 'src')
-rw-r--r-- | src/test.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/test.c b/src/test.c index 282663857..c0edcd513 100644 --- a/src/test.c +++ b/src/test.c @@ -77,7 +77,6 @@ static int argc; /* The number of arguments present in ARGV. */ static char **argv; /* The argument list. */ static bool test_unop (char const *s); -static bool binop (char *s); static bool unary_operator (void); static bool binary_operator (bool); static bool two_arguments (void); @@ -221,6 +220,16 @@ age_of (char const *filename, time_t *age) return ok; } +/* Return true if S is one of the test command's binary operators. */ +static bool +binop (char const *s) +{ + return ((STREQ (s, "=")) || (STREQ (s, "!=")) || (STREQ (s, "-nt")) || + (STREQ (s, "-ot")) || (STREQ (s, "-ef")) || (STREQ (s, "-eq")) || + (STREQ (s, "-ne")) || (STREQ (s, "-lt")) || (STREQ (s, "-le")) || + (STREQ (s, "-gt")) || (STREQ (s, "-ge"))); +} + /* * term - parse a term and return 1 or 0 depending on whether the term * evaluates to true or false, respectively. @@ -702,16 +711,6 @@ expr (void) return or (); /* Same with this. */ } -/* Return true if S is one of the test command's binary operators. */ -static bool -binop (char const *s) -{ - return ((STREQ (s, "=")) || (STREQ (s, "!=")) || (STREQ (s, "-nt")) || - (STREQ (s, "-ot")) || (STREQ (s, "-ef")) || (STREQ (s, "-eq")) || - (STREQ (s, "-ne")) || (STREQ (s, "-lt")) || (STREQ (s, "-le")) || - (STREQ (s, "-gt")) || (STREQ (s, "-ge"))); -} - /* Return true if OP is one of the test command's unary operators. */ static bool test_unop (char const *op) |