Lines Matching refs:toys

73   if (name && (toys.optflags&FLAG_H)) printf("%s%c", name, dash);
74 if (!line || (lcount && (toys.optflags&FLAG_n)))
76 if (bcount && (toys.optflags&FLAG_b)) printf("%ld%c", bcount-1, dash);
109 if (toys.optflags & FLAG_F) { in do_grep()
114 if (toys.optflags & FLAG_x) { in do_grep()
115 int i = (toys.optflags & FLAG_i); in do_grep()
123 if (toys.optflags & FLAG_i) s = strnstr(line, seek->arg); in do_grep()
138 if (toys.optflags & FLAG_x) in do_grep()
141 if (!rc && (toys.optflags & FLAG_w)) { in do_grep()
159 if (toys.optflags & FLAG_v) { in do_grep()
160 if (toys.optflags & FLAG_o) { in do_grep()
179 toys.exitval = 0; in do_grep()
180 if (toys.optflags & FLAG_q) xexit(); in do_grep()
181 if (toys.optflags & FLAG_l) { in do_grep()
187 if (toys.optflags & FLAG_o) in do_grep()
191 if (!(toys.optflags & FLAG_c)) { in do_grep()
193 ((toys.optflags & FLAG_o) ? matches.rm_so : 0); in do_grep()
195 if (!(toys.optflags & FLAG_o)) { in do_grep()
212 if (!(toys.optflags & FLAG_o)) break; in do_grep()
242 if ((toys.optflags & FLAG_m) && mcount >= TT.m) break; in do_grep()
245 if (toys.optflags & FLAG_c) outline(0, ':', name, mcount, 0, -1); in do_grep()
284 if (!(toys.optflags & FLAG_F)) { in parse_regex()
290 len += strlen(al->arg)+1+!(toys.optflags & FLAG_E); in parse_regex()
295 if (!(toys.optflags & FLAG_E)) *(s++) = '\\'; in parse_regex()
298 *(s-=(1+!(toys.optflags & FLAG_E))) = 0; in parse_regex()
301 ((toys.optflags & FLAG_E) ? REG_EXTENDED : 0) | in parse_regex()
302 ((toys.optflags & FLAG_i) ? REG_ICASE : 0)); in parse_regex()
320 if (new->parent && !(toys.optflags & FLAG_h)) toys.optflags |= FLAG_H; in do_grep_r()
331 char **ss = toys.optargs; in grep_main()
336 TT.indelim = '\n' * !(toys.optflags&FLAG_z); in grep_main()
337 TT.outdelim = '\n' * !(toys.optflags&FLAG_Z); in grep_main()
340 if (*toys.which->name == 'e') toys.optflags |= FLAG_E; in grep_main()
341 if (*toys.which->name == 'f') toys.optflags |= FLAG_F; in grep_main()
347 toys.optc--; in grep_main()
352 if (!(toys.optflags & FLAG_h) && toys.optc>1) toys.optflags |= FLAG_H; in grep_main()
354 toys.exitval = 1; in grep_main()
355 if (toys.optflags & FLAG_s) { in grep_main()
360 if (toys.optflags & FLAG_r) { in grep_main()