int main(int argc, char **argv) { if(argc == 1) { lisp_repl(); }else if(argc == 2) { lisp_main(argv[1]); }else{ printf("Too many arguments."); } return 0; }
int main() { char *buf; lisp_main(); rl_attempted_completion_function = my_completion; while((buf = readline("\n line> "))!=NULL) { //enable auto-complete rl_bind_key('\t',rl_complete); //printf("cmd [%s]\n",buf); if (strcmp(buf,"quit")==0) break; if (buf[0]!=0){ add_history(buf); eval_from_c(buf); } } free(buf); return 0; }