Lines Matching refs:history_len
135 static int history_len = 0; variable
741 if (history_len > 1) { in linenoiseEditHistoryNext()
744 free(history[history_len - 1 - l->history_index]); in linenoiseEditHistoryNext()
745 history[history_len - 1 - l->history_index] = strdup(l->buf); in linenoiseEditHistoryNext()
751 } else if (l->history_index >= history_len) { in linenoiseEditHistoryNext()
752 l->history_index = history_len-1; in linenoiseEditHistoryNext()
755 strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen); in linenoiseEditHistoryNext()
892 history_len--; in linenoiseEdit()
893 free(history[history_len]); in linenoiseEdit()
916 history_len--; in linenoiseEdit()
917 free(history[history_len]); in linenoiseEdit()
1161 for (int j = 0; j < history_len; j++) { in linenoiseHistoryFree()
1189 if (history_len && !strcmp(history[history_len-1], line)) return 0; in linenoiseHistoryAdd()
1195 if (history_len == history_max_len) { in linenoiseHistoryAdd()
1198 history_len--; in linenoiseHistoryAdd()
1200 history[history_len] = linecopy; in linenoiseHistoryAdd()
1201 history_len++; in linenoiseHistoryAdd()
1214 int tocopy = history_len; in linenoiseHistorySetMaxLen()
1227 memcpy(new,history+(history_len-tocopy), sizeof(char*)*tocopy); in linenoiseHistorySetMaxLen()
1232 if (history_len > history_max_len) in linenoiseHistorySetMaxLen()
1233 history_len = history_max_len; in linenoiseHistorySetMaxLen()
1245 for (j = 0; j < history_len; j++) in linenoiseHistorySave()