Lines Matching refs:match

33 static const char id[] = "\n@(#)$Id: test" LEGACY "match (AT&T Research) 2012-06-25 $\0\n";
110 H(" m ~STR_MAXIMAL minimal match (default is STR_MAXIMAL)\n");
129 H(" Field 3: the string to match.\n");
132 H(" the match array, a list of (m,n) entries with m and n being first\n");
134 H(" array is specified and success is expected. The match[]\n");
449 matchprint(ssize_t* match, int nmatch, char* ans)
454 if (match[nmatch-2] != -2 && (!state.ignore.position || match[nmatch-2] >= 0 && match[nmatch-2] >= 0))
459 if (match[i] == -1)
462 printf("%zd", match[i]);
464 if (match[i+1] == -1)
467 printf("%zd", match[i+1]);
476 matchcheck(int nmatch, ssize_t* match, char* ans, char* re, char* s, int flags, int query, int unspecified, int expand)
505 if (m!=match[i] || n!=match[i+1])
509 report("failed: match was", NiL, re, s, NiL, flags, unspecified, expand);
510 matchprint(match, nmatch, ans);
517 if (match[i]!=-2 || match[i+1]!=-2)
521 if (state.ignore.position && (match[i]<0 || match[i+1]<0))
526 report("failed: match was", NiL, re, s, NiL, flags, unspecified, expand);
527 matchprint(match, nmatch, ans);
532 if (match[nmatch] != -2)
534 report("failed: overran match array", NiL, re, s, NiL, flags, unspecified, expand);
535 matchprint(match, nmatch + 1, NiL);
632 ssize_t match[200];
795 if ((nmatch = 2 * strtol(p, &p, 10)) >= elementsof(match))
1017 for (i = 0; i < elementsof(match); i++)
1018 match[i] = -2;
1029 eret = (rmatch = strgrpmatch(s, re, match, nmatch / 2, eflags)) == 0;
1044 eret = (rmatch = strgrpmatch(s, re, match, nmatch / 2, eflags)) == 0;
1056 note(level, skip, "old strmatch() does not fall back to literal match on error");
1114 matchprint(match, nmatch, NiL);
1119 if (match[0] != -2)
1125 report("failed: no match but match array assigned", NiL, re, s, msg, nmatch, unspecified, expand);
1126 matchprint(match, nmatch, NiL);
1130 else if (!matchcheck(2 * rmatch, match, ans, re, s, nmatch, query, unspecified, expand))