Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
abbd1bcf
Commit
abbd1bcf
authored
Mar 15, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* regex.c: (regex_compile, re_search_2, re_match_2_internal):
Remove unused local vars.
parent
19ed5445
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
src/ChangeLog
src/ChangeLog
+2
-0
src/regex.c
src/regex.c
+3
-10
No files found.
src/ChangeLog
View file @
abbd1bcf
...
...
@@ -3,6 +3,8 @@
* regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
Rename locals to avoid shadowing.
(regex_compile, re_match_2_internal): Move locals to avoid shadowing.
(regex_compile, re_search_2, re_match_2_internal):
Remove unused local vars.
* search.c (boyer_moore): Rename locals to avoid shadowing.
* character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise.
src/regex.c
View file @
abbd1bcf
...
...
@@ -2571,9 +2571,6 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct
/* If the object matched can contain multibyte characters. */
const
boolean
multibyte
=
RE_MULTIBYTE_P
(
bufp
);
/* If a target of matching can contain multibyte characters. */
const
boolean
target_multibyte
=
RE_TARGET_MULTIBYTE_P
(
bufp
);
/* Nonzero if we have pushed down into a subpattern. */
int
in_subpattern
=
0
;
...
...
@@ -2928,7 +2925,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct
{
boolean
escaped_char
=
false
;
const
unsigned
char
*
p2
=
p
;
re_wchar_t
ch
,
c2
;
re_wchar_t
ch
;
if
(
p
==
pend
)
FREE_STACK_RETURN
(
REG_EBRACK
);
...
...
@@ -2991,10 +2988,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct
them). */
if
(
c
==
':'
&&
*
p
==
']'
)
{
re_wctype_t
cc
;
int
limit
;
cc
=
re_wctype
(
str
);
re_wctype_t
cc
=
re_wctype
(
str
);
if
(
cc
==
0
)
FREE_STACK_RETURN
(
REG_ECTYPE
);
...
...
@@ -4558,7 +4552,6 @@ re_search_2 (struct re_pattern_buffer *bufp, const char *str1, int size1, const
if
(
multibyte
)
{
re_char
*
p
=
POS_ADDR_VSTRING
(
startpos
);
re_char
*
pend
=
STOP_ADDR_VSTRING
(
startpos
);
int
len
=
BYTES_BY_CHAR_HEAD
(
*
p
);
range
-=
len
;
...
...
@@ -5462,7 +5455,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int
else
do
{
int
pat_charlen
,
buf_charlen
;
int
pat_charlen
;
int
pat_ch
,
buf_ch
;
PREFETCH
();
...
...
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