Lines Matching refs:first

71 static VOID cursor_left(UINTN *cursor, UINTN *first) {
74 else if ((*first) > 0)
75 (*first)--;
78 static VOID cursor_right(UINTN *cursor, UINTN *first, UINTN x_max, UINTN len) {
81 else if ((*first) + (*cursor) < len)
82 (*first)++;
89 UINTN first;
106 first = 0;
116 i = len - first;
119 CopyMem(print, line + first, i * sizeof(CHAR16));
148 first = 0;
155 cursor = len - first;
158 first = len - (x_max-1);
166 while (line[first + cursor] && line[first + cursor] == ' ')
167 cursor_right(&cursor, &first, x_max, len);
168 while (line[first + cursor] && line[first + cursor] != ' ')
169 cursor_right(&cursor, &first, x_max, len);
177 if ((first + cursor) > 0 && line[first + cursor-1] == ' ') {
178 cursor_left(&cursor, &first);
179 while ((first + cursor) > 0 && line[first + cursor] == ' ')
180 cursor_left(&cursor, &first);
182 while ((first + cursor) > 0 && line[first + cursor-1] != ' ')
183 cursor_left(&cursor, &first);
191 if (first + cursor == len)
193 cursor_right(&cursor, &first, x_max, len);
201 cursor_left(&cursor, &first);
208 for (i = first + cursor; i < len && line[i] == ' '; i++)
213 for (i = first + cursor; i + clear < len; i++)
224 if ((first + cursor) > 0 && line[first + cursor-1] == ' ') {
225 cursor_left(&cursor, &first);
227 while ((first + cursor) > 0 && line[first + cursor] == ' ') {
228 cursor_left(&cursor, &first);
232 while ((first + cursor) > 0 && line[first + cursor-1] != ' ') {
233 cursor_left(&cursor, &first);
238 for (i = first + cursor; i + clear < len; i++)
249 if (first + cursor == len)
251 for (i = first + cursor; i < len; i++)
260 line[first + cursor] = '\0';
261 clear = len - (first + cursor);
262 len = first + cursor;
278 if (first == 0 && cursor == 0)
280 for (i = first + cursor-1; i < len; i++)
286 if (cursor > 0 || first == 0)
290 cursor = first;
291 first = 0;
295 if (first > 10) {
296 first -= 10;
299 cursor = first;
300 first = 0;
308 for (i = len; i > first + cursor; i--)
310 line[first + cursor] = KEYCHAR(key);
315 else if (first + cursor < len)
316 first++;
875 INTN first;
892 first = 0;
894 if (first == 0)
895 first = *s1 - *s2;
905 if (first)
906 return first;