void
shrink_regexp_cache ()
{
- struct regexp_cache *cp, **cpp;
+ struct regexp_cache *cp;
for (cp = searchbuf_head; cp != 0; cp = cp->next)
{
{
int len = STRING_BYTES (XSTRING (regexp));
unsigned char *s = XSTRING (regexp)->data;
- unsigned char c;
while (--len >= 0)
{
switch (*s++)
/* Null string is found at starting position. */
if (len == 0 || n == 0)
{
- set_search_regs (pos, 0);
+ set_search_regs (pos_byte, 0);
return pos;
}
{
int direction = ((n > 0) ? 1 : -1);
register int dirlen;
- int infinity, limit, k, stride_for_teases = 0;
+ int infinity, limit, stride_for_teases = 0;
register int *BM_tab;
int *BM_tab_base;
register unsigned char *cursor, *p_limit;
Optional third argument, if t, means if fail just return nil (no error).\n\
If not nil and not t, position at limit of search and return nil.\n\
Optional fourth argument is repeat count--search for successive occurrences.\n\
+\n\
+Search case-sensitivity is determined by the value of the variable\n\
+`case-fold-search', which see.\n\
+\n\
See also the functions `match-beginning', `match-end' and `replace-match'.")
(string, bound, noerror, count)
Lisp_Object string, bound, noerror, count;
Optional third argument, if t, means if fail just return nil (no error).\n\
If not nil and not t, move to limit of search and return nil.\n\
Optional fourth argument is repeat count--search for successive occurrences.\n\
+\n\
+Search case-sensitivity is determined by the value of the variable\n\
+`case-fold-search', which see.\n\
+\n\
See also the functions `match-beginning', `match-end' and `replace-match'.")
(string, bound, noerror, count)
Lisp_Object string, bound, noerror, count;
length * sizeof (regoff_t));
}
+ for (i = search_regs.num_regs; i < length; i++)
+ search_regs.start[i] = -1;
+
search_regs.num_regs = length;
}
}
}
else
{
+ int from;
+
if (MARKERP (marker))
{
if (XMARKER (marker)->buffer == 0)
}
CHECK_NUMBER_COERCE_MARKER (marker, 0);
- search_regs.start[i] = XINT (marker);
+ from = XINT (marker);
list = Fcdr (list);
marker = Fcar (list);
XSETFASTINT (marker, 0);
CHECK_NUMBER_COERCE_MARKER (marker, 0);
+ search_regs.start[i] = from;
search_regs.end[i] = XINT (marker);
}
list = Fcdr (list);