Lines Matching defs:mc
67 static void procmatch_match(struct mprintc *mc, struct parsec *pc);
68 static void procmatch_nomatch(struct mprintc *mc, struct parsec *pc);
69 static bool procmatches(struct mprintc *mc, struct parsec *pc, bool matched);
204 procmatch_match(struct mprintc *mc, struct parsec *pc)
207 if (mc->doctx) {
208 if (!first_match && (!mc->same_file || mc->last_outed > 0))
212 mc->tail = Aflag;
216 if (mc->printmatch) {
227 mc->same_file = true;
228 mc->last_outed = 0;
233 procmatch_nomatch(struct mprintc *mc, struct parsec *pc)
237 if (mc->tail > 0) {
239 mc->tail--;
249 ++mc->last_outed;
258 procmatches(struct mprintc *mc, struct parsec *pc, bool matched)
267 mc->tail--;
268 return (mc->tail != 0);
277 procmatch_match(mc, pc);
284 return (mc->tail != 0);
286 } else if (mc->doctx)
287 procmatch_nomatch(mc, pc);
300 struct mprintc mc;
336 memset(&mc, 0, sizeof(mc));
337 mc.printmatch = true;
340 mc.printmatch = false;
341 if (mc.printmatch && (Aflag != 0 || Bflag != 0))
342 mc.doctx = true;
343 if (mc.printmatch && (Aflag != 0 || Bflag != 0 || mflag || nflag))
381 if (!procmatches(&mc, &pc, false))
390 if (!procmatches(&mc, &pc, line_matched))