static int showhistory() { #ifndef NO_HISTORY void EiC_show_history(FILE *fp); EiC_show_history(stdout); #endif return 1; }
int main() { char * line = NULL; printf("**Press ^D in empty line to exit**\n"); do { line = EiC_readline("$$> "); if (line) { if(*line) EiC_add_history(line); free(line); } } while(line); printf("\n-----------------\n"); EiC_show_history(stdout); return 0; }