Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7ae68633
Commit
7ae68633
authored
Sep 19, 1996
by
Richard M. Stallman
Browse files
(regex_compile): Use TRANSLATE before calling SET_LIST_BIT.
parent
6ecb21f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/regex.c
src/regex.c
+4
-3
No files found.
src/regex.c
View file @
7ae68633
...
...
@@ -2083,23 +2083,24 @@ regex_compile (pattern, size, syntax, bufp)
for
(
ch
=
0
;
ch
<
1
<<
BYTEWIDTH
;
ch
++
)
{
int
translated
=
TRANSLATE
(
ch
);
/* This was split into 3 if's to
avoid an arbitrary limit in some compiler. */
if
(
(
is_alnum
&&
ISALNUM
(
ch
))
||
(
is_alpha
&&
ISALPHA
(
ch
))
||
(
is_blank
&&
ISBLANK
(
ch
))
||
(
is_cntrl
&&
ISCNTRL
(
ch
)))
SET_LIST_BIT
(
ch
);
SET_LIST_BIT
(
translated
);
if
(
(
is_digit
&&
ISDIGIT
(
ch
))
||
(
is_graph
&&
ISGRAPH
(
ch
))
||
(
is_lower
&&
ISLOWER
(
ch
))
||
(
is_print
&&
ISPRINT
(
ch
)))
SET_LIST_BIT
(
ch
);
SET_LIST_BIT
(
translated
);
if
(
(
is_punct
&&
ISPUNCT
(
ch
))
||
(
is_space
&&
ISSPACE
(
ch
))
||
(
is_upper
&&
ISUPPER
(
ch
))
||
(
is_xdigit
&&
ISXDIGIT
(
ch
)))
SET_LIST_BIT
(
ch
);
SET_LIST_BIT
(
translated
);
}
had_char_class
=
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment