/**************************************************************/
  /*                                                            */
  /*      UNIX 1 / WS 92/93       Gruppe  ux803                 */
  /*      5. Uebung - Aufgabe 4 - msh.c                         */
  /*                                                            */
  /*      Vorname     Name        Matrikelnr.                   */
  /*     ---------   -------     -------------                  */
  /*      Dietmar     Dierks        125761                      */
  /*      Roman       Czyborra      127221                      */
  /*      Torsten     Buller        117894                      */
  /*      Gerasimos   Paliatsaras   140956                      */
  /*                                                            */
  /**************************************************************/

#include "msh.h"

void main ()
{
  static char buf [BUFLEN], *res;
  static struct kommando *k, *kp;
  
  while (1)
    {
      show_prompt ();
      res = readline (buf, BUFLEN);
      if (!res)
	{ putchar ('\n');
	  return;
	}
      for (k = kp = parseline (buf); kp; kp = kp -> next)
	if (! do_builtin (kp))
	  do_command (kp);
      forget (k);
      do_wait (0, 0);      
    }
}