diff options
| author | Christos Zoulas <christos@zoulas.com> | 2026-05-21 13:21:12 +0100 |
|---|---|---|
| committer | Christos Zoulas <christos@zoulas.com> | 2026-05-21 13:21:12 +0100 |
| commit | b7db07931546178c4cb2542b5fc850c483628ed5 (patch) (diff) | |
| tree | 63c47b9385daa1108536df121f76f67a97391768 | |
| download | tcsh-master.tar.gz | |
| previous commit | f46f164d8b55fc5fc8906e15565ed62dee108241 (Add missing check for p > low, put backslash check in macro.) | |
| -rw-r--r-- | ed.chared.c | [diff] [file] | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ed.chared.c b/ed.chared.c index 99c91d5..6596c17 100644 --- a/ed.chared.c +++ b/ed.chared.c @@ -804,16 +804,16 @@ c_endword(Char *p, Char *low, Char *high, int n, Char *delim) p++; while (n--) { - #define BSLASH (p > low && p[-1] == (Char)'\\') + #define BSLASH(a) (p > low && p[-1] a (Char)'\\') while (p < high) { /* Skip non-word chars */ - if (!Strchr(delim, *p) || BSLASH) + if (!Strchr(delim, *p) || BSLASH(==)) break; p++; } while (p < high) { /* Skip string */ if ((*p == (Char)'\'' || *p == (Char)'"')) { /* Quotation marks? */ /* Should it be honored? */ - if (inquote || BSLASH) { + if (inquote || BSLASH(!=)) { if (inquote == 0) inquote = *p; else if (inquote == *p) @@ -821,7 +821,7 @@ c_endword(Char *p, Char *low, Char *high, int n, Char *delim) } } /* Break if unquoted non-word char */ - if (!inquote && Strchr(delim, *p) && BSLASH) + if (!inquote && Strchr(delim, *p) && BSLASH(!=)) break; p++; } |
