projects
/
chise
/
xemacs-chise.git.1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
XEmacs 21.2.36 "Notos"
[chise/xemacs-chise.git.1]
/
src
/
regex.c
diff --git
a/src/regex.c
b/src/regex.c
index
27fbf6e
..
ef33687
100644
(file)
--- a/
src/regex.c
+++ b/
src/regex.c
@@
-2388,7
+2388,7
@@
regex_compile (const char *pattern, int size, reg_syntax_t syntax,
if (c == ':' || c == ']' || p == pend
|| c1 == CHAR_CLASS_MAX_LENGTH)
break;
if (c == ':' || c == ']' || p == pend
|| c1 == CHAR_CLASS_MAX_LENGTH)
break;
- str[c1++] = c;
+ str[c1++] = (char) c;
}
str[c1] = '\0';
}
str[c1] = '\0';
@@
-5500,22
+5500,25
@@
re_match_2_internal (struct re_pattern_buffer *bufp, const char *string1,
#ifdef emacs
case before_dot:
DEBUG_PRINT1 ("EXECUTING before_dot.\n");
#ifdef emacs
case before_dot:
DEBUG_PRINT1 ("EXECUTING before_dot.\n");
- if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d) >=
- BUF_PT (regex_emacs_buffer))
+ if (!regex_emacs_buffer_p
+ || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
+ >= BUF_PT (regex_emacs_buffer)))
goto fail;
break;
case at_dot:
DEBUG_PRINT1 ("EXECUTING at_dot.\n");
goto fail;
break;
case at_dot:
DEBUG_PRINT1 ("EXECUTING at_dot.\n");
- if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
- != BUF_PT (regex_emacs_buffer))
+ if (!regex_emacs_buffer_p
+ || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
+ != BUF_PT (regex_emacs_buffer)))
goto fail;
break;
case after_dot:
DEBUG_PRINT1 ("EXECUTING after_dot.\n");
goto fail;
break;
case after_dot:
DEBUG_PRINT1 ("EXECUTING after_dot.\n");
- if (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
- <= BUF_PT (regex_emacs_buffer))
+ if (!regex_emacs_buffer_p
+ || (BUF_PTR_BYTE_POS (regex_emacs_buffer, (unsigned char *) d)
+ <= BUF_PT (regex_emacs_buffer)))
goto fail;
break;
#if 0 /* not emacs19 */
goto fail;
break;
#if 0 /* not emacs19 */