Lines Matching refs:history
119 static char **history = NULL; variable
532 free(history[history_len - 1 - l->history_index]); in linenoiseEditHistoryNext()
533 history[history_len - 1 - l->history_index] = strdup(l->buf); in linenoiseEditHistoryNext()
543 strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen); in linenoiseEditHistoryNext()
646 free(history[history_len]); in linenoiseEdit()
802 if (history == NULL) { in linenoiseHistoryAdd()
803 history = malloc(sizeof(char*)*history_max_len); in linenoiseHistoryAdd()
804 if (history == NULL) return 0; in linenoiseHistoryAdd()
805 memset(history,0,(sizeof(char*)*history_max_len)); in linenoiseHistoryAdd()
809 if (history_len && !strcmp(history[history_len-1], line)) return 0; in linenoiseHistoryAdd()
816 free(history[0]); in linenoiseHistoryAdd()
817 memmove(history,history+1,sizeof(char*)*(history_max_len-1)); in linenoiseHistoryAdd()
820 history[history_len] = linecopy; in linenoiseHistoryAdd()
833 if (history) { in linenoiseHistorySetMaxLen()
843 for (j = 0; j < tocopy-len; j++) free(history[j]); in linenoiseHistorySetMaxLen()
847 memcpy(new,history+(history_len-tocopy), sizeof(char*)*tocopy); in linenoiseHistorySetMaxLen()
848 free(history); in linenoiseHistorySetMaxLen()
849 history = new; in linenoiseHistorySetMaxLen()