aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-04-02 22:53:56 +0000
committerJim Blandy1993-04-02 22:53:56 +0000
commit5745b08698e97e2ef3d1f3437673f10406802a0c (patch)
treede5bfbcedd834c1ab021b3d5f8764a9eeceab0dc /src
parentdd4e1002eb7237415dfc49967fbee2b0d066d799 (diff)
downloademacs-5745b08698e97e2ef3d1f3437673f10406802a0c.tar.gz
emacs-5745b08698e97e2ef3d1f3437673f10406802a0c.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/regex.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/regex.c b/src/regex.c
index cb94d597c6f..4d617d39b17 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1302,6 +1302,7 @@ regex_compile (pattern, size, syntax, bufp)
1302 the `*'. Do we have to do something analogous here 1302 the `*'. Do we have to do something analogous here
1303 for null bytes, because of RE_DOT_NOT_NULL? */ 1303 for null bytes, because of RE_DOT_NOT_NULL? */
1304 if (TRANSLATE (*(p - 2)) == TRANSLATE ('.') 1304 if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
1305 && zero_times_ok
1305 && p < pend && TRANSLATE (*p) == TRANSLATE ('\n') 1306 && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
1306 && !(syntax & RE_DOT_NEWLINE)) 1307 && !(syntax & RE_DOT_NEWLINE))
1307 { /* We have .*\n. */ 1308 { /* We have .*\n. */
@@ -1612,6 +1613,10 @@ regex_compile (pattern, size, syntax, bufp)
1612 fixup_alt_jump = 0; 1613 fixup_alt_jump = 0;
1613 laststart = 0; 1614 laststart = 0;
1614 begalt = b; 1615 begalt = b;
1616 /* If we've reached MAX_REGNUM groups, then this open
1617 won't actually generate any code, so we'll have to
1618 clear pending_exact explicitly. */
1619 pending_exact = 0;
1615 break; 1620 break;
1616 1621
1617 1622
@@ -1661,6 +1666,10 @@ regex_compile (pattern, size, syntax, bufp)
1661 : 0; 1666 : 0;
1662 laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset; 1667 laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset;
1663 this_group_regnum = COMPILE_STACK_TOP.regnum; 1668 this_group_regnum = COMPILE_STACK_TOP.regnum;
1669 /* If we've reached MAX_REGNUM groups, then this open
1670 won't actually generate any code, so we'll have to
1671 clear pending_exact explicitly. */
1672 pending_exact = 0;
1664 1673
1665 /* We're at the end of the group, so now we know how many 1674 /* We're at the end of the group, so now we know how many
1666 groups were inside this one. */ 1675 groups were inside this one. */
@@ -4881,6 +4890,13 @@ regerror (errcode, preg, errbuf, errbuf_size)
4881 Dump core so we can fix it. */ 4890 Dump core so we can fix it. */
4882 abort (); 4891 abort ();
4883 4892
4893 msg = re_error_msg[errcode];
4894
4895 /* POSIX doesn't require that we do anything in this case, but why
4896 not be nice. */
4897 if (! msg)
4898 msg = "Success";
4899
4884 msg_size = strlen (msg) + 1; /* Includes the null. */ 4900 msg_size = strlen (msg) + 1; /* Includes the null. */
4885 4901
4886 if (errbuf_size != 0) 4902 if (errbuf_size != 0)