Lines Matching refs:matches
7 * TODO: --color, "Binary file %s matches"
90 // Show matches in one file
109 regmatch_t matches;
123 // Loop through matches in this line
127 // Handle non-regex matches
148 matches.rm_so = (s-line);
149 skip = matches.rm_eo = (s-line)+strlen(seek->arg);
152 rc = regexec((regex_t *)toybuf, start, 1, &matches,
154 skip = matches.rm_eo;
158 if (matches.rm_so || line[matches.rm_eo]) rc = 1;
163 if ((start+matches.rm_so)!=line) {
164 c = start[matches.rm_so-1];
168 c = start[matches.rm_eo];
172 start += matches.rm_so+1;
180 if (rc) skip = matches.rm_eo = strlen(start);
181 else if (!matches.rm_so) {
184 } else matches.rm_eo = matches.rm_so;
187 matches.rm_eo = strlen(start);
189 matches.rm_so = 0;
210 if (matches.rm_eo == matches.rm_so)
215 ((toys.optflags & FLAG_o) ? matches.rm_so : 0);
229 } else outline(start+matches.rm_so, ':', name, lcount, bcount,
230 matches.rm_eo-matches.rm_so);