Lines Matching refs: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) in procmatch_match() argument
207 if (mc->doctx) { in procmatch_match()
208 if (!first_match && (!mc->same_file || mc->last_outed > 0)) in procmatch_match()
212 mc->tail = Aflag; in procmatch_match()
216 if (mc->printmatch) { in procmatch_match()
241 mc->same_file = true; in procmatch_match()
242 mc->last_outed = 0; in procmatch_match()
247 procmatch_nomatch(struct mprintc *mc, struct parsec *pc) in procmatch_nomatch() argument
251 if (mc->tail > 0) { in procmatch_nomatch()
253 mc->tail--; in procmatch_nomatch()
263 ++mc->last_outed; in procmatch_nomatch()
272 procmatches(struct mprintc *mc, struct parsec *pc, bool matched) in procmatches() argument
281 mc->tail--; in procmatches()
282 return (mc->tail != 0); in procmatches()
291 procmatch_match(mc, pc); in procmatches()
298 return (mc->tail != 0); in procmatches()
300 } else if (mc->doctx) in procmatches()
301 procmatch_nomatch(mc, pc); in procmatches()
314 struct mprintc mc; in procfile() local
350 memset(&mc, 0, sizeof(mc)); in procfile()
351 mc.printmatch = true; in procfile()
354 mc.printmatch = false; in procfile()
355 if (mc.printmatch && (Aflag != 0 || Bflag != 0)) in procfile()
356 mc.doctx = true; in procfile()
357 if (mc.printmatch && (Aflag != 0 || Bflag != 0 || mflag || nflag)) in procfile()
395 if (!procmatches(&mc, &pc, false)) in procfile()
404 if (!procmatches(&mc, &pc, line_matched)) in procfile()