Lines Matching refs:FLAG
96 if (!trim && FLAG(o)) return; in outline()
97 if (name && FLAG(H)) printf("%s%s%s%c", TT.purple, name, TT.cyan, dash); in outline()
98 if (FLAG(c)) { in outline()
101 } else if (lcount && FLAG(n)) numdash(lcount, dash); in outline()
102 if (bcount && FLAG(b)) numdash(bcount-1, dash); in outline()
104 if (FLAG(color)) xputsn(FLAG(o) ? TT.red : TT.grey); in outline()
120 if (!FLAG(r)) TT.tried++; in do_grep()
124 if (!FLAG(a) && !lseek(fd, 0, SEEK_CUR)) { in do_grep()
140 if (bin && FLAG(I)) return; in do_grep()
171 if (FLAG(F)) { in do_grep()
176 if (FLAG(x)) { in do_grep()
177 if (!(FLAG(i) ? strcasecmp : strcmp)(seek->arg, line)) s = line; in do_grep()
182 } else if (FLAG(i)) s = strcasestr(start, seek->arg); in do_grep()
221 if (!rc && FLAG(o) && !mm->rm_eo && ulen>start-line) { in do_grep()
226 if (!rc && FLAG(x) && (mm->rm_so || ulen-(start-line)!=mm->rm_eo)) rc = 1; in do_grep()
228 if (!rc && FLAG(w)) { in do_grep()
245 if (FLAG(v)) { in do_grep()
246 if (FLAG(o)) { in do_grep()
266 if (FLAG(q)) { in do_grep()
270 if (FLAG(l)) { in do_grep()
277 if (!FLAG(c)) { in do_grep()
278 long bcount = 1 + offset + (start-line) + (FLAG(o) ? mm->rm_so : 0); in do_grep()
281 else if (FLAG(o)) in do_grep()
296 outline(FLAG(color) ? 0 : line, ':', name, lcount, bcount, ulen); in do_grep()
297 if (FLAG(color)) { in do_grep()
310 if (!FLAG(o) && FLAG(color)) break; in do_grep()
316 if (FLAG(color) && !FLAG(o)) { in do_grep()
353 if (FLAG(m) && mcount >= TT.m) break; in do_grep()
356 if (FLAG(c)) outline(0, ':', name, mcount, 0, 1); in do_grep()
394 ss = FLAG(z) ? 0 : strchr(s, '\n'); in parse_regex()
405 if (!FLAG(F)) { in parse_regex()
410 if (FLAG(o) && !*al->arg) continue; in parse_regex()
413 (REG_EXTENDED*!!FLAG(E))|(REG_ICASE*!!FLAG(i))); in parse_regex()
429 return DIRTREE_RECURSE|(FLAG(R)?DIRTREE_SYMFOLLOW:0); in do_grep_r()
444 if (new->parent && !FLAG(h)) toys.optflags |= FLAG_H; in do_grep_r()
457 if (FLAG(color) && (!TT.color || !strcmp(TT.color, "auto")) && !isatty(1)) in grep_main()
460 if (FLAG(color)) { in grep_main()
468 if (FLAG(R)) toys.optflags |= FLAG_r; in grep_main()
476 TT.indelim = '\n' * !FLAG(z); in grep_main()
477 TT.outdelim = '\n' * !FLAG(Z); in grep_main()
492 if (!FLAG(h) && toys.optc>1) toys.optflags |= FLAG_H; in grep_main()
494 if (FLAG(s)) { in grep_main()
499 if (FLAG(r)) { in grep_main()
506 if (TT.tried >= toys.optc || (FLAG(q)&&TT.found)) toys.exitval = !TT.found; in grep_main()