• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/libgrep/

Lines Matching defs:pattern

52 #  define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
63 # define re_compile_pattern(pattern, length, bufp) \
64 __re_compile_pattern (pattern, length, bufp)
146 /* This must be nonzero for the wordchar and notwordchar pattern
355 static reg_errcode_t byte_regex_compile (const char *pattern, size_t size,
373 static reg_errcode_t wcs_regex_compile (const char *pattern, size_t size,
440 the range 0 to one less than the pattern buffer's re_nsub
450 pattern buffer, and one byte with the number of inner groups,
597 /* Common operations on the compiled pattern. */
754 /* Print a compiled pattern string in human-readable form, starting at
771 /* Loop over pattern commands. */
1083 printf ("%td:\tend of pattern.\n", p - start);
1085 printf ("%ld:\tend of pattern.\n", (long int) (p - start));
1266 also be assigned to arbitrarily: each pattern buffer stores its own
1669 DEBUG_PRINT2 (" Pushing pattern %p:\n", pattern_place); \
1717 PAT -- the saved pattern position.
1754 DEBUG_PRINT2 (" Popping pattern %p:\n", pat); \
1865 static boolean PREFIX(at_begline_loc_p) (const CHAR_T *pattern,
1889 /* Fetch the next character in the uncompiled pattern---translating it
1912 /* Fetch the next character in the uncompiled pattern, with no
1919 /* Go backwards one character in the pattern. */
1943 /* Macros for outputting the compiled pattern into `buffer'. */
2005 into the pattern are two bytes long. So if 2^16 bytes turns out to
2166 /* Get the next unsigned number in the uncompiled pattern. */
2279 `buffer' is the compiled pattern;
2281 `used' is set to the length of the compiled pattern;
2292 return (free(pattern), free(mbs_offset), free(is_binary), free (compile_stack.stack), value)
2299 PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
2310 /* A temporary space to keep wchar_t pattern and compiled pattern. */
2311 CHAR_T *pattern, *COMPILED_BUFFER_VAR;
2330 /* Points to the current (ending) position in the pattern. */
2335 const CHAR_T *p = pattern;
2336 const CHAR_T *pend = pattern + size;
2339 /* How to translate the characters in the pattern. */
2368 p = pend = pattern = TALLOC(csize + 1, CHAR_T);
2371 if (pattern == NULL || mbs_offset == NULL || is_binary == NULL)
2373 free(pattern);
2378 pattern[csize] = L'\0'; /* sentinel */
2379 size = convert_mbs_to_wcs(pattern, cpattern, csize, mbs_offset, is_binary);
2383 free(pattern);
2391 DEBUG_PRINT1 ("\nCompiling pattern: ");
2397 PUT_CHAR (pattern[debug_count]);
2407 free(pattern);
2417 /* Initialize the pattern buffer. */
2422 /* Set `used' to zero, so that if we return an error, the pattern
2423 printer (for debugging) will think there's no pattern. We reset it
2442 /* Free bufp->buffer and allocate an array for wchar_t pattern
2470 /* Loop through the uncompiled pattern until we're at the end. */
2479 if ( /* If at start of pattern, it's an operator. */
2480 p == pattern + 1
2484 || PREFIX(at_begline_loc_p) (pattern, p, syntax))
2494 if ( /* If at end of pattern, it's an operator. */
2514 /* If there is no previous pattern... */
2572 /* Star, etc. applied to an empty pattern is equivalent
2573 to an empty pattern. */
2590 assert (p - 1 > pattern);
2595 /* We know we are not at the first character of the pattern,
2772 && !(p - 2 >= pattern && p[-2] == '[')
2773 && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
2811 /* If pattern is `[[:'. */
2889 /* If pattern is `[[=' or '[[.'. */
3183 && !(p - 2 >= pattern && p[-2] == '[')
3184 && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
3216 /* If pattern is `[[:'. */
3336 /* If pattern is `[[='. */
3470 /* If pattern is `[[.'. */
3684 whole pattern moves because of realloc, they will still
3695 represent in the compiled pattern. */
3846 /* Place in the uncompiled pattern (i.e., just after
3909 we're all done, the pattern will look like:
3966 inserting into the middle of the pattern --
4114 || is_exactn_bin != is_binary[p - 1 - pattern]
4139 is_exactn_bin = is_binary[p - 1 - pattern];
4157 /* Through the pattern now. */
4166 the first time we reach the end of the compiled pattern. */
4171 free (pattern);
4187 DEBUG_PRINT1 ("\nCompiled pattern: \n");
4298 PREFIX(at_begline_loc_p) (const CHAR_T *pattern, const CHAR_T *p,
4302 boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
4356 /* This insert space, which size is "num", into the pattern at "loc".
4436 /* Have to increment the pointer into the pattern string, so the
4444 uncompiled pattern *P_PTR (which ends at PEND). We assume the
4447 ending characters (inclusive) in the compiled pattern B.
4474 /* Have to increment the pointer into the pattern string, so the
4521 /* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
4523 characters can start a string that matches the pattern. This fastmap
4530 the pattern buffer.
4564 /* We need to cast pattern to (wchar_t*), because we casted this compiled
4565 pattern to (char*) in regex_compile. */
4566 UCHAR_T *pattern = (UCHAR_T*)bufp->buffer;
4569 UCHAR_T *pattern = bufp->buffer;
4570 register UCHAR_T *pend = pattern + bufp->used;
4572 UCHAR_T *p = pattern;
4580 /* Assume that each path through the pattern can be null until
4600 /* We have reached the (effective) end of pattern. */
4616 /* We should never be about to go beyond the end of the pattern. */
4792 end of the pattern. We don't want to push such a point,
4794 increment `p' past the end of the pattern. We don't need
4796 fastmap entries beyond `pend'. Such a pattern can match
4849 characters for one path of the pattern -- and that the empty
4859 pattern is empty). */
4942 /* Using the compiled pattern in BUFP->buffer, first tries to match the
5061 search for a pattern that must be anchored. */
5169 cannot be the start of a match. If the pattern can match the
5398 we use only one byte in the pattern for the register number), we can
5457 /* re_match_2 matches the compiled pattern in BUFP against the
5599 /* Where we are in the pattern, and the end of the pattern. */
5601 UCHAR_T *pattern, *p;
5620 to resume scanning the pattern; the second one is where to resume
5649 attempt) by a subexpression part of the pattern, that is, the
5650 regnum-th regstart pointer points to where in the pattern we began
5653 keeps track of what the whole pattern matches.) */
5670 matched any of the pattern so far this time through the reg_num-th
5798 no groups in the pattern, as it takes a fair amount of time. If
5800 pattern), even though we never use it, since it simplifies the
5886 /* We need to cast pattern to (wchar_t*), because we casted this compiled
5887 pattern to (char*) in regex_compile. */
5888 p = pattern = (CHAR_T*)bufp->buffer;
5959 /* `p' scans through the pattern as `d' scans through the data.
5997 DEBUG_PRINT1 ("The compiled pattern is:\n");
6003 /* This loops over pattern commands. It exits by returning from the
6023 /* End of pattern means we might have succeeded. */
6024 DEBUG_PRINT1 ("end of pattern ... ");
6076 For example, the pattern `x.*y.*z' against the
6173 were in the pattern, set the extra elements to -1. If
6205 /* Otherwise match next pattern command. */
6219 /* Match the next n pattern characters exactly. The following
6220 byte in the pattern defines n, and the n bytes after that
6797 /* If the next operation is a jump backwards in the pattern
6801 on_failure_jump's jump in the pattern, and d. */
7069 pattern follows its end. If we can establish that there
7103 /* If we're at the end of the pattern, we can change. */
7112 (" End of pattern: change to `pop_failure_jump'.\n");
7228 on_failure_jump; we got through the pattern to here from the
7278 pop_failure_jump, also, and with a pattern of, say, `a+', we
7284 the code at `fail' tests is the value for the pattern. */
7532 continue; /* Successfully executed one pattern command; keep going. */
7549 /* If we failed to the end of the pattern, don't examine *p. */
7599 Return true if the pattern up to the corresponding stop_memory can
7629 pattern. */
7637 with a jump, e.g., here is the pattern for `a|b|c':
7870 Returns 0 if the pattern was valid, otherwise an error string.
7878 re_compile_pattern (const char *pattern,
7898 ret = wcs_regex_compile (pattern, length, re_syntax_options, bufp);
7901 ret = byte_regex_compile (pattern, length, re_syntax_options, bufp);
7917 /* BSD has one and only one pattern buffer. */
7953 don't need to initialize the pattern buffer fields which affect it. */
7996 `buffer' to the compiled pattern;
7997 `used' to the length of the compiled pattern;
8006 PATTERN is the address of the pattern string.
8027 regcomp (regex_t *preg, const char *pattern, int cflags)
8034 /* regex_compile will allocate the space for the compiled pattern. */
8072 /* POSIX says a null character in the pattern terminates it, so we
8073 can use strlen here in compiling the pattern. */
8076 ret = wcs_regex_compile (pattern, strlen (pattern), syntax, preg);
8079 ret = byte_regex_compile (pattern, strlen (pattern), syntax, preg);
8087 /* Compute the fastmap now, since regexec cannot modify the pattern
8105 /* regexec searches for a given pattern, specified by PREG, in the