Home | History | Annotate | Download | only in pax

Lines Matching refs:PATTERN

63  * routines to handle pattern matching, name modification (regular expression
70 static PATTERN *pathead = NULL; /* file pattern match list head */
71 static PATTERN *pattail = NULL; /* file pattern match list tail */
135 * allocate space for the node that handles this replacement pattern
229 * add a pattern match to the pattern match list. Pattern matches are used
233 * pattern match list is empty).
236 * 0 if the pattern was added to the list, -1 otherwise
242 PATTERN *pt;
248 tty_warn(1, "Empty pattern string");
253 * allocate space for the pattern and store the pattern. the pattern is
255 * node to the end of the pattern list
257 if ((pt = (PATTERN *)malloc(sizeof(PATTERN))) == NULL) {
258 tty_warn(1, "Unable to allocate memory for pattern string");
279 * complain if any the user supplied pattern did not result in a match to
286 PATTERN *pt;
306 * the archive member which matches a pattern was selected. Mark the
307 * pattern as having selected an archive member. arcn->pat points at the
308 * pattern that was matched. arcn->pat is set in pat_match()
314 * NOT be selected (it found an archive member with a specified pattern)
316 * 0 if the pattern pointed at by arcn->pat was tagged as creating a
323 PATTERN *pt;
324 PATTERN **ppt;
334 * when we are NOT limited to a single match per pattern mark the
335 * pattern and return
344 * pattern, if the pattern matches a directory and we do not have -d
345 * (dflag) we are done with this pattern. We may also be handed a file
347 * with -d, this pattern was already selected and we are done
370 tty_warn(1, "Pattern select out of memory");
400 * we are then done with this pattern, so we delete it from the list
404 * and the pattern rejects a member (i.e. it matched it) it is done.
418 tty_warn(1, "Pattern list inconsistent");
429 * see if this archive member matches any supplied pattern, if a match
430 * is found, arcn->pat is set to point at the potential pattern. Later if
431 * this archive member is "selected" we process and mark the pattern as
442 PATTERN *pt;
463 * this pattern then we want a prefix match
467 * this pattern was matched before to a directory
490 * member. However we have to tag the pattern a being successful, (in a
514 fn_match(char *pattern, char *string, char **pend, int noglob)
521 switch (c = *pattern++) {
550 c = *pattern;
555 c = *++pattern;
558 * Optimized hack for pattern with a * at the end
567 if (!fn_match(pattern, string, pend, noglob))
579 ((pattern = range_match(pattern, test)) == NULL))
594 range_match(char *pattern, int test)
601 if ((negate = (*pattern == '!')) != 0)
602 ++pattern;
604 while ((c = *pattern++) != ']') {
606 * Illegal pattern
611 if ((*pattern == '-') && ((c2 = pattern[1]) != '\0') &&
615 pattern += 2;
619 return (ok == negate ? NULL : pattern);
942 * the next pattern, or cleanup if we were global