Lines Matching refs:TT
42 if (TT.any) putchar('\n');
43 if (TT.any && TT.cell != 2) putchar('\n'); // gawk alias
44 TT.any = TT.cell = 0;
49 while (*x && (TT.ex || *x != '\n')) TT.any = putchar(*x++);
57 for (k = 0; TT.line[k]; k++) if (!strncmp(x, &TT.line[k], i)) {
58 memmove(&TT.line[k], y, j);
59 for (l = k += j; TT.line[l]; l++) TT.line[l] = TT.line[l + i - j];
66 return !strncmp(x, TT.line, strlen(x));
71 if (start(x)) while (*x++) TT.line++;
75 TT.k_done = 2;
76 if (s) TT.line = s;
77 return !regexec(&TT.reg, TT.k, 0, 0, 0)||!regexec(&TT.reg, TT.line, 0, 0, 0);
83 TT.line = *pline;
86 if (!TT.k_done && !start(".") && !start("'") && k(strstr(*pline, "- ")))
87 printf("%-20s %s%s", TT.k, "- "+2*(TT.line!=*pline), TT.line);
88 else if (!TT.k_done && start(".so") && k(basename(*pline + 4)))
89 printf("%s - See %s", TT.k, TT.line);
108 if (start(".E")) TT.ex = TT.line[2] == 'X'; // stat example
111 else if (start(".S")) newln(), put(TT.line + 4), newln(); // bash section
112 else if (start(".so")) put("See "), put(basename(TT.line + 4)); // lastb
113 else if (start(".TH")) s("\"", " "), put(TT.line + 4); // gawk,git head
114 else if (start(".TP")) newln(), TT.cell = 1; // bash table
116 else if (!*TT.line); // emerge
118 if (TT.cell) TT.cell++;
119 if (!TT.ex) put(" ");
120 put(TT.line);
129 char **known = TT.sufs, *suf = strrchr(s, '.');
142 if (*++TT.sct) return 0;
143 if (!(TT.m = strsep(&TT.M, ":"))) return 1;
144 TT.sct = TT.scts;
152 char *s = xmprintf("%s/man%s/%s.%s.bz2", TT.m, *TT.sct, name, *TT.sct), **suf;
156 suf = TT.sufs;
167 TT.scts = (char *[]) {"1", "8", "3", "2", "5", "4", "6", "7", 0};
168 TT.sct = TT.scts - 1; // First manpath() read increments.
169 TT.sufs = (char *[]) {".bz2", ".gz", ".xz", "", 0};
171 if (!TT.M) TT.M = getenv("MANPATH");
172 if (!TT.M) TT.M = "/usr/share/man";
179 xregcomp(&TT.reg, TT.k, REG_ICASE|REG_NOSUB);
181 d = xmprintf("%s/man%s", TT.m, *TT.sct);
185 f = xmprintf("%s/%s", d, TT.k = entry->d_name);
187 TT.k_done = 0;
195 return regfree(&TT.reg);
207 TT.scts = (char *[]){*toys.optargs, 0}, TT.sct = TT.scts - 1;
209 if (fd == -1) error_exit("section %s no %s", *--TT.sct, toys.optargs[1]);