/[emacs]/emacs/src/search.c
ViewVC logotype

Diff of /emacs/src/search.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.187 by rms, Fri Nov 19 19:38:26 2004 UTC revision 1.188 by rms, Fri Nov 19 20:02:32 2004 UTC
# Line 41  Boston, MA 02111-1307, USA.  */ Line 41  Boston, MA 02111-1307, USA.  */
41  struct regexp_cache  struct regexp_cache
42  {  {
43    struct regexp_cache *next;    struct regexp_cache *next;
44    Lisp_Object regexp;    Lisp_Object regexp, whitespace_regexp;
45    struct re_pattern_buffer buf;    struct re_pattern_buffer buf;
46    char fastmap[0400];    char fastmap[0400];
47    /* Nonzero means regexp was compiled to do full POSIX backtracking.  */    /* Nonzero means regexp was compiled to do full POSIX backtracking.  */
# Line 109  matcher_overflow () Line 109  matcher_overflow ()
109     for this pattern.  0 means backtrack only enough to get a valid match.     for this pattern.  0 means backtrack only enough to get a valid match.
110     MULTIBYTE is nonzero if we want to handle multibyte characters in     MULTIBYTE is nonzero if we want to handle multibyte characters in
111     PATTERN.  0 means all multibyte characters are recognized just as     PATTERN.  0 means all multibyte characters are recognized just as
112     sequences of binary data.  */     sequences of binary data.
113    
114       The behavior also depends on Vsearch_whitespace_regexp.  */
115    
116  static void  static void
117  compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte)  compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte)
# Line 160  compile_pattern_1 (cp, pattern, translat Line 162  compile_pattern_1 (cp, pattern, translat
162    cp->buf.translate = (! NILP (translate) ? translate : make_number (0));    cp->buf.translate = (! NILP (translate) ? translate : make_number (0));
163    cp->posix = posix;    cp->posix = posix;
164    cp->buf.multibyte = multibyte;    cp->buf.multibyte = multibyte;
165      cp->whitespace_regexp = Vsearch_whitespace_regexp;
166    BLOCK_INPUT;    BLOCK_INPUT;
167    old = re_set_syntax (RE_SYNTAX_EMACS    old = re_set_syntax (RE_SYNTAX_EMACS
168                         | (posix ? 0 : RE_NO_POSIX_BACKTRACKING));                         | (posix ? 0 : RE_NO_POSIX_BACKTRACKING));
# Line 232  compile_pattern (pattern, regp, translat Line 235  compile_pattern (pattern, regp, translat
235            && !NILP (Fstring_equal (cp->regexp, pattern))            && !NILP (Fstring_equal (cp->regexp, pattern))
236            && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0)))            && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0)))
237            && cp->posix == posix            && cp->posix == posix
238            && cp->buf.multibyte == multibyte)            && cp->buf.multibyte == multibyte
239              && !NILP (Fequal (cp->whitespace_regexp, Vsearch_whitespace_regexp)))
240          break;          break;
241    
242        /* If we're at the end of the cache, compile into the nil cell        /* If we're at the end of the cache, compile into the nil cell
# Line 2981  syms_of_search () Line 2985  syms_of_search ()
2985        searchbufs[i].buf.buffer = (unsigned char *) xmalloc (100);        searchbufs[i].buf.buffer = (unsigned char *) xmalloc (100);
2986        searchbufs[i].buf.fastmap = searchbufs[i].fastmap;        searchbufs[i].buf.fastmap = searchbufs[i].fastmap;
2987        searchbufs[i].regexp = Qnil;        searchbufs[i].regexp = Qnil;
2988          searchbufs[i].whitespace_regexp = Qnil;
2989        staticpro (&searchbufs[i].regexp);        staticpro (&searchbufs[i].regexp);
2990        searchbufs[i].next = (i == REGEXP_CACHE_SIZE-1 ? 0 : &searchbufs[i+1]);        searchbufs[i].next = (i == REGEXP_CACHE_SIZE-1 ? 0 : &searchbufs[i+1]);
2991      }      }

Legend:
Removed from v.1.187  
changed lines
  Added in v.1.188

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26