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

/fuchsia/zircon/third_party/ulib/linenoise/
H A Dlinenoise.c161 int history_index; /* The history index we are currently editing. */ member in struct:linenoiseState
761 free(history[history_len - 1 - l->history_index]);
762 history[history_len - 1 - l->history_index] = strdup(l->buf);
764 l->history_index += (dir == LINENOISE_HISTORY_PREV) ? 1 : -1;
765 if (l->history_index < 0) {
766 l->history_index = 0;
768 } else if (l->history_index >= history_len) {
769 l->history_index = history_len-1;
772 strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen);
841 l.history_index
[all...]

Completed in 75 milliseconds