Lines Matching refs:mc
70 static void procmatch_match(struct mprintc *mc, struct parsec *pc);
71 static void procmatch_nomatch(struct mprintc *mc, struct parsec *pc);
72 static bool procmatches(struct mprintc *mc, struct parsec *pc, bool matched);
198 procmatch_match(struct mprintc *mc, struct parsec *pc) in procmatch_match() argument
201 if (mc->doctx) { in procmatch_match()
202 if (!first_match && (!mc->same_file || mc->last_outed > 0)) in procmatch_match()
206 mc->tail = Aflag; in procmatch_match()
210 if (mc->printmatch) { in procmatch_match()
221 mc->same_file = true; in procmatch_match()
222 mc->last_outed = 0; in procmatch_match()
227 procmatch_nomatch(struct mprintc *mc, struct parsec *pc) in procmatch_nomatch() argument
231 if (mc->tail > 0) { in procmatch_nomatch()
233 mc->tail--; in procmatch_nomatch()
243 ++mc->last_outed; in procmatch_nomatch()
252 procmatches(struct mprintc *mc, struct parsec *pc, bool matched) in procmatches() argument
261 mc->tail--; in procmatches()
262 return (mc->tail != 0); in procmatches()
271 procmatch_match(mc, pc); in procmatches()
278 return (mc->tail != 0); in procmatches()
280 } else if (mc->doctx) in procmatches()
281 procmatch_nomatch(mc, pc); in procmatches()
294 struct mprintc mc; in procfile() local
330 memset(&mc, 0, sizeof(mc)); in procfile()
331 mc.printmatch = true; in procfile()
334 mc.printmatch = false; in procfile()
335 if (mc.printmatch && (Aflag != 0 || Bflag != 0)) in procfile()
336 mc.doctx = true; in procfile()
337 if (mc.printmatch && (Aflag != 0 || Bflag != 0 || mflag || nflag)) in procfile()
375 if (!procmatches(&mc, &pc, false)) in procfile()
384 if (!procmatches(&mc, &pc, line_matched)) in procfile()