Lines Matching refs:bufp

73 #  define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \  argument
74 __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
75 # define re_match(bufp, string, size, pos, regs) \ argument
76 __re_match (bufp, string, size, pos, regs)
77 # define re_search(bufp, string, size, startpos, range, regs) \ argument
78 __re_search (bufp, string, size, startpos, range, regs)
79 # define re_compile_pattern(pattern, length, bufp) \ argument
80 __re_compile_pattern (pattern, length, bufp)
82 # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ argument
83 __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
84 # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) argument
410 struct re_pattern_buffer *bufp);
412 static int byte_re_match_2_internal (struct re_pattern_buffer *bufp,
418 static int byte_re_search_2 (struct re_pattern_buffer *bufp,
423 static int byte_re_compile_fastmap (struct re_pattern_buffer *bufp);
428 struct re_pattern_buffer *bufp);
431 static int wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
440 static int wcs_re_search_2 (struct re_pattern_buffer *bufp,
445 static int wcs_re_compile_fastmap (struct re_pattern_buffer *bufp);
611 # define COMPILED_BUFFER_VAR bufp->buffer
1140 PREFIX(print_compiled_pattern) (struct re_pattern_buffer *bufp) in PREFIX()
1142 UCHAR_T *buffer = (UCHAR_T*) bufp->buffer; in PREFIX()
1145 + bufp->used / sizeof(UCHAR_T)); in PREFIX()
1147 bufp->used, bufp->allocated); in PREFIX()
1149 if (bufp->fastmap_accurate && bufp->fastmap) in PREFIX()
1152 print_fastmap (bufp->fastmap); in PREFIX()
1156 printf ("re_nsub: %Zd\t", bufp->re_nsub); in PREFIX()
1158 printf ("re_nsub: %ld\t", (long int) bufp->re_nsub); in PREFIX()
1160 printf ("regs_alloc: %d\t", bufp->regs_allocated); in PREFIX()
1161 printf ("can_be_null: %d\t", bufp->can_be_null); in PREFIX()
1162 printf ("newline_anchor: %d\n", bufp->newline_anchor); in PREFIX()
1163 printf ("no_sub: %d\t", bufp->no_sub); in PREFIX()
1164 printf ("not_bol: %d\t", bufp->not_bol); in PREFIX()
1165 printf ("not_eol: %d\t", bufp->not_eol); in PREFIX()
1166 printf ("syntax: %lx\n", bufp->syntax); in PREFIX()
1656 DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
1741 DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
1937 + (n)*sizeof(CHAR_T)) > bufp->allocated) \
1941 while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated) \
2014 # define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated)
2040 if (bufp->allocated + sizeof(UCHAR_T) > MAX_BUF_SIZE) \
2042 bufp->allocated <<= 1; \
2043 if (bufp->allocated > MAX_BUF_SIZE) \
2044 bufp->allocated = MAX_BUF_SIZE; \
2046 wchar_count = bufp->allocated / sizeof(UCHAR_T); \
2049 bufp->allocated = wchar_count * sizeof(UCHAR_T); \
2051 bufp->buffer = (char*)COMPILED_BUFFER_VAR; \
2073 if (bufp->allocated == MAX_BUF_SIZE) \
2075 bufp->allocated <<= 1; \
2076 if (bufp->allocated > MAX_BUF_SIZE) \
2077 bufp->allocated = MAX_BUF_SIZE; \
2078 bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR, \
2079 bufp->allocated); \
2284 struct re_pattern_buffer *bufp) in PREFIX()
2322 RE_TRANSLATE_TYPE translate = bufp->translate; in PREFIX()
2400 bufp->syntax = syntax; in PREFIX()
2401 bufp->fastmap_accurate = 0; in PREFIX()
2402 bufp->not_bol = bufp->not_eol = 0; in PREFIX()
2407 bufp->used = 0; in PREFIX()
2410 bufp->re_nsub = 0; in PREFIX()
2417 if (bufp->allocated == 0) in PREFIX()
2419 if (bufp->buffer) in PREFIX()
2426 free(bufp->buffer); in PREFIX()
2441 bufp->buffer = (char*)COMPILED_BUFFER_VAR; in PREFIX()
2443 bufp->allocated = INIT_BUF_SIZE; in PREFIX()
2447 COMPILED_BUFFER_VAR = (UCHAR_T*) bufp->buffer; in PREFIX()
3657 bufp->re_nsub++; in PREFIX()
4166 bufp->used = (uintptr_t) b - (uintptr_t) COMPILED_BUFFER_VAR; in PREFIX()
4168 bufp->used = b - bufp->buffer; in PREFIX()
4175 PREFIX(print_compiled_pattern) (bufp); in PREFIX()
4184 int num_regs = bufp->re_nsub + 1; in PREFIX()
4541 PREFIX(re_compile_fastmap) (struct re_pattern_buffer *bufp) in PREFIX()
4551 register char *fastmap = bufp->fastmap; in PREFIX()
4556 UCHAR_T *pattern = (UCHAR_T*)bufp->buffer; in PREFIX()
4557 register UCHAR_T *pend = (UCHAR_T*) (bufp->buffer + bufp->used); in PREFIX()
4559 UCHAR_T *pattern = bufp->buffer; in PREFIX()
4560 register UCHAR_T *pend = pattern + bufp->used; in PREFIX()
4583 bufp->fastmap_accurate = 1; /* It will be when we're done. */ in PREFIX()
4584 bufp->can_be_null = 0; in PREFIX()
4593 bufp->can_be_null |= path_can_be_null; in PREFIX()
4618 bufp->can_be_null = 1; in PREFIX()
4647 bufp->can_be_null = 1; in PREFIX()
4691 if (!(bufp->syntax & RE_DOT_NEWLINE)) in PREFIX()
4696 else if (bufp->can_be_null) in PREFIX()
4797 bufp->can_be_null = 1; in PREFIX()
4850 bufp->can_be_null |= path_can_be_null; in PREFIX()
4860 re_compile_fastmap (struct re_pattern_buffer *bufp) in re_compile_fastmap() argument
4864 return wcs_re_compile_fastmap(bufp); in re_compile_fastmap()
4867 return byte_re_compile_fastmap(bufp); in re_compile_fastmap()
4888 re_set_registers (struct re_pattern_buffer *bufp, in weak_alias()
4894 bufp->regs_allocated = REGS_REALLOCATE; in weak_alias()
4901 bufp->regs_allocated = REGS_UNALLOCATED; in weak_alias()
4916 re_search (struct re_pattern_buffer *bufp, const char *string, int size, in weak_alias()
4919 return re_search_2 (bufp, NULL, 0, string, size, startpos, range, in weak_alias()
4949 re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int size1, in weak_alias()
4955 return wcs_re_search_2 (bufp, string1, size1, string2, size2, startpos, in weak_alias()
4959 return byte_re_search_2 (bufp, string1, size1, string2, size2, startpos, in weak_alias()
5007 PREFIX(re_search_2) (struct re_pattern_buffer *bufp, const char *string1,
5013 register char *fastmap = bufp->fastmap;
5014 register RE_TRANSLATE_TYPE translate = bufp->translate;
5042 if (bufp->used > 0 && range > 0
5043 && ((re_opcode_t) bufp->buffer[0] == begbuf
5045 || ((re_opcode_t) bufp->buffer[0] == begline
5046 && !bufp->newline_anchor)))
5057 if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
5066 if (fastmap && !bufp->fastmap_accurate)
5067 if (re_compile_fastmap (bufp) == -2)
5152 if (fastmap && startpos < total_size && !bufp->can_be_null)
5191 && !bufp->can_be_null)
5200 val = wcs_re_match_2_internal (bufp, string1, size1, string2,
5206 val = byte_re_match_2_internal (bufp, string1, size1, string2,
5393 re_match (struct re_pattern_buffer *bufp, const char *string,
5399 result = wcs_re_match_2_internal (bufp, NULL, 0, string, size,
5404 result = byte_re_match_2_internal (bufp, NULL, 0, string, size,
5448 re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1, in re_match_2() argument
5455 result = wcs_re_match_2_internal (bufp, string1, size1, string2, size2, in re_match_2()
5460 result = byte_re_match_2_internal (bufp, string1, size1, string2, size2, in re_match_2()
5528 wcs_re_match_2_internal (struct re_pattern_buffer *bufp, in wcs_re_match_2_internal() argument
5543 byte_re_match_2_internal (struct re_pattern_buffer *bufp, in wcs_re_match_2_internal()
5575 UCHAR_T *p = bufp->buffer; in wcs_re_match_2_internal()
5576 register UCHAR_T *pend = p + bufp->used; in wcs_re_match_2_internal()
5584 RE_TRANSLATE_TYPE translate = bufp->translate; in wcs_re_match_2_internal()
5612 size_t num_regs = bufp->re_nsub + 1; in wcs_re_match_2_internal()
5691 if (bufp->re_nsub) in wcs_re_match_2_internal()
5777 p = pattern = (CHAR_T*)bufp->buffer; in wcs_re_match_2_internal()
5778 pend = (CHAR_T*)(bufp->buffer + bufp->used); in wcs_re_match_2_internal()
5887 DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend); in wcs_re_match_2_internal()
5975 if (regs && !bufp->no_sub) in wcs_re_match_2_internal()
5978 if (bufp->regs_allocated == REGS_UNALLOCATED) in wcs_re_match_2_internal()
5990 bufp->regs_allocated = REGS_REALLOCATE; in wcs_re_match_2_internal()
5992 else if (bufp->regs_allocated == REGS_REALLOCATE) in wcs_re_match_2_internal()
6012 assert (bufp->regs_allocated == REGS_FIXED); in wcs_re_match_2_internal()
6153 if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n') in wcs_re_match_2_internal()
6154 || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000')) in wcs_re_match_2_internal()
6831 if (!bufp->not_bol) break; in wcs_re_match_2_internal()
6833 else if (d[-1] == '\n' && bufp->newline_anchor) in wcs_re_match_2_internal()
6847 if (!bufp->not_eol) break; in wcs_re_match_2_internal()
6852 && bufp->newline_anchor) in wcs_re_match_2_internal()
7021 || (bufp->newline_anchor && (re_opcode_t) *p2 == endline)) in wcs_re_match_2_internal()
7766 struct re_pattern_buffer *bufp)
7772 bufp->regs_allocated = REGS_UNALLOCATED;
7777 bufp->no_sub = 0;
7780 bufp->newline_anchor = 1;
7784 ret = wcs_regex_compile (pattern, length, re_syntax_options, bufp);
7787 ret = byte_regex_compile (pattern, length, re_syntax_options, bufp);