fix test operator comment descriptions
This commit is contained in:
parent
833cb27f5c
commit
cad44b9f01
19
funcs.c
19
funcs.c
@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.339 2017/04/12 17:38:44 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.340 2017/04/12 17:46:29 tg Exp $");
|
||||||
|
|
||||||
#if HAVE_KILLPG
|
#if HAVE_KILLPG
|
||||||
/*
|
/*
|
||||||
@ -2578,14 +2578,13 @@ c_mknod(const char **wp)
|
|||||||
| "(" oexpr ")"
|
| "(" oexpr ")"
|
||||||
;
|
;
|
||||||
|
|
||||||
unary-operator ::= "-a"|"-r"|"-w"|"-x"|"-e"|"-f"|"-d"|"-c"|"-b"|"-p"|
|
unary-operator ::= "-a"|"-b"|"-c"|"-d"|"-e"|"-f"|"-G"|"-g"|"-H"|"-h"|
|
||||||
"-u"|"-g"|"-k"|"-s"|"-t"|"-z"|"-n"|"-o"|"-O"|"-G"|
|
"-k"|"-L"|"-n"|"-O"|"-o"|"-p"|"-r"|"-S"|"-s"|"-t"|
|
||||||
"-L"|"-h"|"-S"|"-H";
|
"-u"|"-v"|"-w"|"-x"|"-z";
|
||||||
|
|
||||||
|
binary-operator ::= "="|"=="|"!="|"<"|">"|"-eq"|"-ne"|"-gt"|"-ge"|
|
||||||
|
"-lt"|"-le"|"-ef"|"-nt"|"-ot";
|
||||||
|
|
||||||
binary-operator ::= "="|"=="|"!="|"-eq"|"-ne"|"-ge"|"-gt"|"-le"|"-lt"|
|
|
||||||
"-nt"|"-ot"|"-ef"|
|
|
||||||
"<"|">" # rules used for [[ ... ]] expressions
|
|
||||||
;
|
|
||||||
operand ::= <anything>
|
operand ::= <anything>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -2833,7 +2832,7 @@ test_eval(Test_env *te, Test_op op, const char *opnd1, const char *opnd2,
|
|||||||
case TO_FILEXST:
|
case TO_FILEXST:
|
||||||
return (test_stat(opnd1, &b1) == 0);
|
return (test_stat(opnd1, &b1) == 0);
|
||||||
|
|
||||||
/* -r */
|
/* -f */
|
||||||
case TO_FILREG:
|
case TO_FILREG:
|
||||||
return (test_stat(opnd1, &b1) == 0 && S_ISREG(b1.st_mode));
|
return (test_stat(opnd1, &b1) == 0 && S_ISREG(b1.st_mode));
|
||||||
|
|
||||||
@ -2934,7 +2933,7 @@ test_eval(Test_env *te, Test_op op, const char *opnd1, const char *opnd2,
|
|||||||
* Binary Operators
|
* Binary Operators
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* = */
|
/* =, == */
|
||||||
case TO_STEQL:
|
case TO_STEQL:
|
||||||
if (te->flags & TEF_DBRACKET) {
|
if (te->flags & TEF_DBRACKET) {
|
||||||
if ((i = gmatchx(opnd1, opnd2, false)))
|
if ((i = gmatchx(opnd1, opnd2, false)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user