Lines Matching refs:front
1036 char *back, *front, *map, *p, *search, *t;
1056 front = map;
1057 back = front + sb.st_size;
1058 front = binary_search(tname, front, back);
1059 front = linear_search(tname, front, back, tl);
1060 if (front == NULL)
1082 for (p = front; p < back && *p != '\n'; ++p);
1089 p = front;
1090 front = t;
1199 * Binary search for "string" in memory between "front" and "back".
1206 * front points to the beginning of a line at or before the first
1213 * front = NULL;
1218 * p = first newline after halfway point from front to back.
1221 * p is the new front. Otherwise it is the new back.
1226 * since front is always at or before the line to print.
1230 * (back - front), which in turn implies that a linear search will
1244 binary_search(char *string, char *front, char *back)
1248 p = front + (back - front) / 2;
1253 front = p;
1256 p = front + (back - front) / 2;
1259 return (front);
1263 * Find the first line that starts with string, linearly searching from front
1270 * o front points at the first character in a line.
1271 * o front is before or at the first line to be printed.
1274 linear_search(char *string, char *front, char *back, long tl)
1277 while (front < back) {
1278 end = tl && back-front > tl ? front+tl : back;
1279 switch (compare(string, front, end)) {
1281 return (front);
1287 SKIP_PAST_NEWLINE(front, back);