diff options
Diffstat (limited to 'Src')
| -rw-r--r-- | Src/builtin.c | 4 | ||||
| -rw-r--r-- | Src/parse.c | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 1c0eb331e..ba2fe1cdf 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -7243,6 +7243,10 @@ testlex(void) tok = INPAR; else if (!strcmp(*testargs, ")")) tok = OUTPAR; + else if (!strcmp(*testargs, "<")) + tok = INANG; + else if (!strcmp(*testargs, ">")) + tok = OUTANG; else tok = STRING; testargs++; diff --git a/Src/parse.c b/Src/parse.c index 0ba7c701c..ab708a279 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2495,6 +2495,8 @@ par_cond_2(void) /* three arguments: if the second argument is a binary operator, * * perform that binary test on the first and the third argument */ if (!strcmp(*testargs, "=") || + !strcmp(*testargs, "<") || + !strcmp(*testargs, ">") || !strcmp(*testargs, "==") || !strcmp(*testargs, "!=") || (IS_DASH(**testargs) && get_cond_num(*testargs + 1) >= 0)) { @@ -2661,6 +2663,12 @@ par_cond_triple(char *a, char *b, char *c) ecstr(a); ecstr(c); ecadd(ecnpats++); + } else if ((t0 = (b[0] == '>' || b[0] == Outang) || + b[0] == '<' || b[0] == Inang) && !b[1]) { + ecadd(WCB_COND(t0 ? COND_STRGTR : COND_STRLT, 0)); + ecstr(a); + ecstr(c); + ecadd(ecnpats++); } else if ((b[0] == Equals || b[0] == '=') && (b[1] == Equals || b[1] == '=') && !b[2]) { ecadd(WCB_COND(COND_STRDEQ, 0)); |
