| 584 | } |
| 585 | |
| 586 | static bool |
| 587 | three_arguments (void) |
| 588 | { |
| 589 | bool value; |
| 590 | int bop = binop (argv[pos + 1]); |
| 591 | |
| 592 | if (0 <= bop) |
| 593 | value = binary_operator (false, bop); |
| 594 | else if (streq (argv[pos], "!")) |
| 595 | { |
| 596 | advance (true); |
| 597 | value = !two_arguments (); |
| 598 | } |
| 599 | else if (streq (argv[pos], "(") && streq (argv[pos + 2], ")")) |
| 600 | { |
| 601 | advance (false); |
| 602 | value = one_argument (); |
| 603 | advance (false); |
| 604 | } |
| 605 | else if (streq (argv[pos + 1], "-a") || streq (argv[pos + 1], "-o") |
| 606 | || streq (argv[pos + 1], ">") || streq (argv[pos + 1], "<")) |
| 607 | value = expr (); |
| 608 | else |
| 609 | test_syntax_error (_("%s: binary operator expected"), |
| 610 | quote (argv[pos + 1])); |
| 611 | return (value); |
| 612 | } |
| 613 | |
| 614 | /* This is an implementation of a Posix.2 proposal by David Korn. */ |
| 615 | static bool |
no test coverage detected