diff options
| author | Richard M. Stallman | 1996-09-19 03:00:06 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-19 03:00:06 +0000 |
| commit | 7ae686336551c7cf0f241198d53d39ebfc5ab17e (patch) | |
| tree | 6d5518ee7ec6d24a1fc3d944efc7b1bfc9afebeb /src | |
| parent | 6ecb21f15884aa592bac868c5d940c477b317573 (diff) | |
| download | emacs-7ae686336551c7cf0f241198d53d39ebfc5ab17e.tar.gz emacs-7ae686336551c7cf0f241198d53d39ebfc5ab17e.zip | |
(regex_compile): Use TRANSLATE before calling SET_LIST_BIT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regex.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/regex.c b/src/regex.c index 9d8d2d489fd..4f222a5e42e 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -2083,23 +2083,24 @@ regex_compile (pattern, size, syntax, bufp) | |||
| 2083 | 2083 | ||
| 2084 | for (ch = 0; ch < 1 << BYTEWIDTH; ch++) | 2084 | for (ch = 0; ch < 1 << BYTEWIDTH; ch++) |
| 2085 | { | 2085 | { |
| 2086 | int translated = TRANSLATE (ch); | ||
| 2086 | /* This was split into 3 if's to | 2087 | /* This was split into 3 if's to |
| 2087 | avoid an arbitrary limit in some compiler. */ | 2088 | avoid an arbitrary limit in some compiler. */ |
| 2088 | if ( (is_alnum && ISALNUM (ch)) | 2089 | if ( (is_alnum && ISALNUM (ch)) |
| 2089 | || (is_alpha && ISALPHA (ch)) | 2090 | || (is_alpha && ISALPHA (ch)) |
| 2090 | || (is_blank && ISBLANK (ch)) | 2091 | || (is_blank && ISBLANK (ch)) |
| 2091 | || (is_cntrl && ISCNTRL (ch))) | 2092 | || (is_cntrl && ISCNTRL (ch))) |
| 2092 | SET_LIST_BIT (ch); | 2093 | SET_LIST_BIT (translated); |
| 2093 | if ( (is_digit && ISDIGIT (ch)) | 2094 | if ( (is_digit && ISDIGIT (ch)) |
| 2094 | || (is_graph && ISGRAPH (ch)) | 2095 | || (is_graph && ISGRAPH (ch)) |
| 2095 | || (is_lower && ISLOWER (ch)) | 2096 | || (is_lower && ISLOWER (ch)) |
| 2096 | || (is_print && ISPRINT (ch))) | 2097 | || (is_print && ISPRINT (ch))) |
| 2097 | SET_LIST_BIT (ch); | 2098 | SET_LIST_BIT (translated); |
| 2098 | if ( (is_punct && ISPUNCT (ch)) | 2099 | if ( (is_punct && ISPUNCT (ch)) |
| 2099 | || (is_space && ISSPACE (ch)) | 2100 | || (is_space && ISSPACE (ch)) |
| 2100 | || (is_upper && ISUPPER (ch)) | 2101 | || (is_upper && ISUPPER (ch)) |
| 2101 | || (is_xdigit && ISXDIGIT (ch))) | 2102 | || (is_xdigit && ISXDIGIT (ch))) |
| 2102 | SET_LIST_BIT (ch); | 2103 | SET_LIST_BIT (translated); |
| 2103 | } | 2104 | } |
| 2104 | had_char_class = true; | 2105 | had_char_class = true; |
| 2105 | } | 2106 | } |