Searched refs:history_index (Results 1 - 1 of 1) sorted by relevance

/system/core/liblinenoise/
H A Dlinenoise.c219 int history_index = 0; local
299 free(history[history_len-1-history_index]);
300 history[history_len-1-history_index] = strdup(buf);
302 history_index += (seq[1] == 65) ? 1 : -1;
303 if (history_index < 0) {
304 history_index = 0;
306 } else if (history_index >= history_len) {
307 history_index = history_len-1;
310 strncpy(buf,history[history_len-1-history_index],buflen);

Completed in 49 milliseconds