/*
 * main.c
 * File Revision 1
 * Main loop for smallsh.
 * (c) 1999 Addison Wesley Longman, Inc.
 * (c) 2000 Jacob Lundberg, jacob@chaos2.org
 */


/*
 * 2000.11.05	Acquire initial code
 *		Adjust style and prompt
 */


#include <signal.h>
#include "smallsh.h"


void handle_sigint(int signo) {
/*
 * handle_sigint()
 * Reprint the prompt since we've lost anything the user has typed.
 */

   printf("\n");
   doprompt(PROMPT);
   return;

}


int main() {
/*
 * main()
 * Loop doing nothing
 */

   /* Ignore ^C signals. */
   signal(SIGINT, handle_sigint);

   /* Loop on user input. */
   while(userin(PROMPT) != EOF) {
      procline();
   }

   return(0);

}

