aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-06-24 07:44:13 +0000
committerKaroly Lorentey2004-06-24 07:44:13 +0000
commit3fa701994755105d1fb4b0b802338fc04e8a6937 (patch)
tree02ec9152f5f6e95bbb0b02265f51b832e712e8b5 /src/syntax.c
parent8c8d5f3503a2fb4918414c0b0b9dacd81c50f1a9 (diff)
parentbb72b9d0b5248404a55b599d99c0be5454704e4a (diff)
downloademacs-3fa701994755105d1fb4b0b802338fc04e8a6937.tar.gz
emacs-3fa701994755105d1fb4b0b802338fc04e8a6937.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-409 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410 Make sure image types are initialized for lookup too * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-411 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-412 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-413 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-414 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-415 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-416 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-417 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-418 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-419 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-202
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 62612620f03..302250c39a4 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1455,7 +1455,7 @@ skip_chars (forwardp, syntaxp, string, lim, handle_iso_classes)
1455 { 1455 {
1456 const unsigned char *class_beg = str + i_byte + 1; 1456 const unsigned char *class_beg = str + i_byte + 1;
1457 const unsigned char *class_end = class_beg; 1457 const unsigned char *class_end = class_beg;
1458 const unsigned char *class_limit = str + size_byte; 1458 const unsigned char *class_limit = str + size_byte - 2;
1459 /* Leave room for the null. */ 1459 /* Leave room for the null. */
1460 unsigned char class_name[CHAR_CLASS_MAX_LENGTH + 1]; 1460 unsigned char class_name[CHAR_CLASS_MAX_LENGTH + 1];
1461 re_wctype_t cc; 1461 re_wctype_t cc;
@@ -1463,17 +1463,13 @@ skip_chars (forwardp, syntaxp, string, lim, handle_iso_classes)
1463 if (class_limit - class_beg > CHAR_CLASS_MAX_LENGTH) 1463 if (class_limit - class_beg > CHAR_CLASS_MAX_LENGTH)
1464 class_limit = class_beg + CHAR_CLASS_MAX_LENGTH; 1464 class_limit = class_beg + CHAR_CLASS_MAX_LENGTH;
1465 1465
1466 while (class_end != class_limit 1466 while (class_end < class_limit
1467 && ! (*class_end >= 0200 1467 && *class_end >= 'a' && *class_end <= 'z')
1468 || *class_end <= 040
1469 || (*class_end == ':'
1470 && class_end[1] == ']')))
1471 class_end++; 1468 class_end++;
1472 1469
1473 if (class_end == class_limit 1470 if (class_end == class_beg
1474 || *class_end >= 0200 1471 || *class_end != ':' || class_end[1] != ']')
1475 || *class_end <= 040) 1472 goto not_a_class_name;
1476 error ("Invalid ISO C character class");
1477 1473
1478 bcopy (class_beg, class_name, class_end - class_beg); 1474 bcopy (class_beg, class_name, class_end - class_beg);
1479 class_name[class_end - class_beg] = 0; 1475 class_name[class_end - class_beg] = 0;
@@ -1488,6 +1484,7 @@ skip_chars (forwardp, syntaxp, string, lim, handle_iso_classes)
1488 continue; 1484 continue;
1489 } 1485 }
1490 1486
1487 not_a_class_name:
1491 if (c == '\\') 1488 if (c == '\\')
1492 { 1489 {
1493 if (i_byte == size_byte) 1490 if (i_byte == size_byte)