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
f5020181
Commit
f5020181
authored
Mar 16, 2008
by
Andreas Schwab
Browse files
(re_match_2_internal): Correct matching of a charset
against latin-1 characters.
parent
7edd6b92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
src/ChangeLog
src/ChangeLog
+5
-0
src/regex.c
src/regex.c
+12
-3
No files found.
src/ChangeLog
View file @
f5020181
2008-03-16 Andreas Schwab <schwab@suse.de>
* regex.c (re_match_2_internal): Correct matching of a charset
against latin-1 characters.
2008-03-16 Kenichi Handa <handa@m17n.org>
* coding.c (CHAR_STRING_ADVANCE_NO_UNIFY)
...
...
src/regex.c
View file @
f5020181
...
...
@@ -5648,6 +5648,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
in the initial byte-length of the command. */
int
count
=
0
;
/* Whether matching against a unibyte character. */
boolean
unibyte_char
=
false
;
DEBUG_PRINT2
(
"EXECUTING charset%s.
\n
"
,
not
?
"_not"
:
""
);
range_table_exists
=
CHARSET_RANGE_TABLE_EXISTS_P
(
&
p
[
-
1
]);
...
...
@@ -5667,7 +5670,10 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
c
=
TRANSLATE
(
c
);
c1
=
RE_CHAR_TO_UNIBYTE
(
c
);
if
(
c1
>=
0
)
c
=
c1
;
{
unibyte_char
=
true
;
c
=
c1
;
}
}
else
{
...
...
@@ -5678,11 +5684,14 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
c1
=
TRANSLATE
(
c1
);
c1
=
RE_CHAR_TO_UNIBYTE
(
c1
);
if
(
c1
>=
0
)
c
=
c1
;
{
unibyte_char
=
true
;
c
=
c1
;
}
}
}
if
(
c
<
(
1
<<
BYTEWIDTH
))
if
(
unibyte_char
&&
c
<
(
1
<<
BYTEWIDTH
))
{
/* Lookup bitmap. */
/* Cast to `unsigned' instead of `unsigned char' in
case the bit list is a full 32 bytes long. */
...
...
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