Lines Matching defs:prefix
23 * look for lines beginning with <prefix> in sorted a sorted file
35 "[+NAME?look - displays lines beginning with a given prefix]"
37 " that begin with the given prefix \aprefix\a onto the standard output."
39 " \amax-prefix\a is specified then then records matching prefixes"
40 " in the inclusive range \aprefix\a..\amax-prefix\a are displayed.]"
48 "\nprefix [- max-prefix] [file ...]\n"
95 look(Sfio_t* fp, char* prefix, char* maxprefix, int flags)
111 cp = dp = prefix;
116 len = strlen(prefix);
132 n = len = strlen(prefix);
133 if (maxprefix && (*compare)(prefix, maxprefix, n) > 0)
143 n = (*compare)(prefix, EXTRACT(flags, cp, buff, len), len);
151 prefix = maxprefix;
152 len = strlen(prefix);
153 if (n && (*compare)(prefix, EXTRACT(flags, cp, buff, len), len) >= 0)
162 n = (*compare)(prefix, EXTRACT(flags, cp, buff, len), len);
181 n = (*compare)(prefix, EXTRACT(flags, cp, buff, len), len);
199 n = (*compare)(prefix, EXTRACT(flags, cp, buff, len), len);
206 prefix = maxprefix;
207 len = strlen(prefix);
208 if (n && (*compare)(prefix, EXTRACT(flags, cp, buff, len), len) >= 0)
217 n = (*compare)(prefix, EXTRACT(flags, cp, buff, len), len);