Lines Matching refs:TT
89 printf("%s%ld%s%c", TT.green, num, TT.cyan, dash); in numdash()
97 if (name && FLAG(H)) printf("%s%s%s%c", TT.purple, name, TT.cyan, dash); in outline()
99 printf("%s%ld", TT.grey, lcount); in outline()
100 xputc(TT.outdelim); in outline()
104 if (FLAG(color)) xputsn(FLAG(o) ? TT.red : TT.grey); in outline()
107 xputc(TT.outdelim); in outline()
120 if (!FLAG(r)) TT.tried++; in do_grep()
156 ulen = len = getdelim(&line, &ulen, TT.indelim, file); in do_grep()
159 if (line[ulen-1] == TT.indelim) line[--ulen] = 0; in do_grep()
163 if (TT.reg) for (shoe = (void *)TT.reg; shoe; shoe = shoe->next) in do_grep()
175 for (seek = TT.e; seek; seek = seek->next) { in do_grep()
200 for (shoe = (void *)TT.reg; shoe; shoe = shoe->next) { in do_grep()
265 TT.found = 1; in do_grep()
271 xprintf("%s%c", name, TT.outdelim); in do_grep()
298 xputsn(TT.grey); in do_grep()
300 xputsn(TT.red); in do_grep()
304 if (TT.A) after = TT.A+1; in do_grep()
317 xputsn(TT.grey); in do_grep()
319 xputc(TT.outdelim); in do_grep()
323 int discard = (after || TT.B); in do_grep()
329 if (discard && TT.B) { in do_grep()
338 if (++before>TT.B) { in do_grep()
353 if (FLAG(m) && mcount >= TT.m) break; in do_grep()
375 al = TT.f ? TT.f : TT.e; in parse_regex()
377 if (TT.f) { in parse_regex()
386 if (!al && TT.f) { in parse_regex()
387 TT.f = 0; in parse_regex()
388 al = TT.e; in parse_regex()
403 TT.e = list; in parse_regex()
407 for (al = TT.e; al; al = al->next) { in parse_regex()
411 dlist_add_nomalloc(&TT.reg, (void *)(shoe = xmalloc(sizeof(struct reg)))); in parse_regex()
415 dlist_terminate(TT.reg); in parse_regex()
424 if (!new->parent) TT.tried++; in do_grep_r()
427 for (al = TT.exclude_dir; al; al = al->next) in do_grep_r()
431 if (TT.S || TT.M) { in do_grep_r()
432 for (al = TT.S; al; al = al->next) in do_grep_r()
435 if (TT.M) { in do_grep_r()
436 for (al = TT.M; al; al = al->next) in do_grep_r()
457 if (FLAG(color) && (!TT.color || !strcmp(TT.color, "auto")) && !isatty(1)) in grep_main()
461 TT.purple = "\033[35m"; in grep_main()
462 TT.cyan = "\033[36m"; in grep_main()
463 TT.red = "\033[1;31m"; in grep_main()
464 TT.green = "\033[32m"; in grep_main()
465 TT.grey = "\033[0m"; in grep_main()
466 } else TT.purple = TT.cyan = TT.red = TT.green = TT.grey = ""; in grep_main()
473 if (!TT.A) TT.A = TT.C; in grep_main()
474 if (!TT.B) TT.B = TT.C; in grep_main()
476 TT.indelim = '\n' * !FLAG(z); in grep_main()
477 TT.outdelim = '\n' * !FLAG(Z); in grep_main()
483 if (!TT.e && !TT.f) { in grep_main()
485 TT.e = xzalloc(sizeof(struct arg_list)); in grep_main()
486 TT.e->arg = *(ss++); in grep_main()
506 if (TT.tried >= toys.optc || (FLAG(q)&&TT.found)) toys.exitval = !TT.found; in grep_main()