コード例 #1
0
ファイル: eicmod.c プロジェクト: JackJone/opencv
static int showhistory()
{
  #ifndef NO_HISTORY
    void EiC_show_history(FILE *fp);
    EiC_show_history(stdout);
  #endif
    return 1;
}
コード例 #2
0
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;
}