Home | History | Annotate | Download | only in spellprog

Lines Matching refs:front

58 look(u_char *string, u_char *front, u_char *back)
68 front = binary_search(string, front, back);
69 front = linear_search(string, front, back);
71 return (front != NULL);
75 * Binary search for "string" in memory between "front" and "back".
82 * front points to the beginning of a line at or before the first
89 * front = NULL;
94 * p = first newline after halfway point from front to back.
97 * p is the new front. Otherwise it is the new back.
102 * since front is always at or before the line to print.
106 * (back - front), which in turn implies that a linear search will
117 binary_search(u_char *string, u_char *front, u_char *back)
121 p = front + (back - front) / 2;
128 while (p < back && back > front) {
130 front = p;
133 p = front + (back - front) / 2;
136 return (front);
140 * Find the first line that matches string, linearly searching from front
147 * o front points at the first character in a line.
148 * o front is before or at the first line to be printed.
151 linear_search(u_char *string, u_char *front, u_char *back)
155 while (front < back) {
156 result = compare(string, front, back);
158 return (front); /* found it */
162 SKIP_PAST_NEWLINE(front, back);