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
b3bda4fd
Commit
b3bda4fd
authored
Jun 15, 2004
by
Kim F. Storm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(skip_chars): Only recognize [:class:] when it has the
proper format and class is a lower-case word.
parent
cdc97764
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
src/syntax.c
src/syntax.c
+7
-10
No files found.
src/syntax.c
View file @
b3bda4fd
...
...
@@ -1455,7 +1455,7 @@ skip_chars (forwardp, syntaxp, string, lim, handle_iso_classes)
{
const
unsigned
char
*
class_beg
=
str
+
i_byte
+
1
;
const
unsigned
char
*
class_end
=
class_beg
;
const
unsigned
char
*
class_limit
=
str
+
size_byte
;
const
unsigned
char
*
class_limit
=
str
+
size_byte
-
2
;
/* Leave room for the null. */
unsigned
char
class_name
[
CHAR_CLASS_MAX_LENGTH
+
1
];
re_wctype_t
cc
;
...
...
@@ -1463,17 +1463,13 @@ skip_chars (forwardp, syntaxp, string, lim, handle_iso_classes)
if
(
class_limit
-
class_beg
>
CHAR_CLASS_MAX_LENGTH
)
class_limit
=
class_beg
+
CHAR_CLASS_MAX_LENGTH
;
while
(
class_end
!=
class_limit
&&
!
(
*
class_end
>=
0200
||
*
class_end
<=
040
||
(
*
class_end
==
':'
&&
class_end
[
1
]
==
']'
)))
while
(
class_end
<
class_limit
&&
*
class_end
>=
'a'
&&
*
class_end
<=
'z'
)
class_end
++
;
if
(
class_end
==
class_limit
||
*
class_end
>=
0200
||
*
class_end
<=
040
)
error
(
"Invalid ISO C character class"
);
if
(
class_end
==
class_beg
||
*
class_end
!=
':'
||
class_end
[
1
]
!=
']'
)
goto
not_a_class_name
;
bcopy
(
class_beg
,
class_name
,
class_end
-
class_beg
);
class_name
[
class_end
-
class_beg
]
=
0
;
...
...
@@ -1488,6 +1484,7 @@ skip_chars (forwardp, syntaxp, string, lim, handle_iso_classes)
continue
;
}
not_a_class_name:
if
(
c
==
'\\'
)
{
if
(
i_byte
==
size_byte
)
...
...
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