/* $Id: shell.c,v 1.20 2004/04/04 04:02:32 jmuelmen Exp $ */ /* shell.c */ #include "rl.h" #include "shell.h" #include "scheduler.h" #include #include #include /* history file name */ extern char histfile[]; extern char yy_empty_file; int yyparse (); void *shell (void *arg) { int parse_stat; /* register functions */ func_register(); while (1) { int parse_stat; parsebuf_save_pos(); ident_save_pos(); if (parse_stat = yyparse()) { parsebuf_clear_after_pos(); ident_clear_after_pos(); } else { /* first save the history */ if (write_history(histfile)) perror("Saving history"); parsebuf_process(); } } /* ident_dump(); */ /* sleep(10); */ /* ident_dump(); */ return NULL; }