Lines Matching refs:op
291 filecomp (s, t, op)
293 int op;
300 if (op == EF)
305 if (op == EF)
309 switch (op)
319 arithcomp (s, t, op, flags)
321 int op, flags;
343 switch (op)
357 patcomp (string, pat, op)
359 int op;
364 return ((op == EQ) ? (m == 0) : (m != 0));
368 binary_test (op, arg1, arg2, flags)
369 char *op, *arg1, *arg2;
376 if (op[0] == '=' && (op[1] == '\0' || (op[1] == '=' && op[2] == '\0')))
379 else if ((op[0] == '>' || op[0] == '<') && op[1] == '\0')
380 return ((op[0] == '>') ? (strcmp (arg1, arg2) > 0) : (strcmp (arg1, arg2) < 0));
382 else if (op[0] == '!' && op[1] == '=' && op[2] == '\0')
385 else if (op[2] == 't')
387 switch (op[1])
395 else if (op[1] == 'e')
397 switch (op[2])
403 else if (op[2] == 'e')
405 switch (op[1])
457 char *op;
460 op = argv[pos];
461 if (test_unop (op) == 0)
465 if (op[1] == 't')
473 return (unary_test (op, argv[pos - 1]));
479 return (unary_test (op, "1"));
487 return (unary_test (op, argv[pos - 1]));
491 unary_test (op, arg)
492 char *op, *arg;
497 switch (op[1])
605 test_binop (op)
606 char *op;
608 if (op[0] == '=' && op[1] == '\0')
610 else if ((op[0] == '<' || op[0] == '>') && op[1] == '\0') /* string <, > */
612 else if ((op[0] == '=' || op[0] == '!') && op[1] == '=' && op[2] == '\0')
615 else if (op[2] == '\0' && op[1] == '~' && (op[0] == '=' || op[0] == '!'))
618 else if (op[0] != '-' || op[2] == '\0' || op[3] != '\0')
622 if (op[2] == 't')
623 switch (op[1])
633 else if (op[1] == 'e')
634 switch (op[2])
642 else if (op[2] == 'e')
643 switch (op[1])
659 test_unop (op)
660 char *op;
662 if (op[0] != '-')
665 switch (op[1])