#include "ParseCommandLine2.h"

int main()
{
  struct CommandData d;
  char line[255];
  int i,j;
  while (1) {
    printf("> ");
    fgets(line, 250, stdin); 
    if (strncmp(line,"quit",4)==0) {
      break;
    }
    if (ParseCommandLine(line,&d)) {
      for (i=0;i<d.numcommands;i++) {
	printf("Command is %s ",d.TheCommands[i].command);
        printf("Args are ");
        for(j=0;j<d.TheCommands[i].numargs;j++)
       	  printf("%s ",d.TheCommands[i].args[j]);
        printf("\n");
      }
      if (d.infile != NULL) 
           printf("Infile is %s\n",d.infile);
      if (d.outfile != NULL) 
          printf("Outfile is %s\n",d.outfile);
      if (d.background) 
         printf("Background\n");
    } /* end of if (Parseline .. */
  } /* end of while (1) */
  printf("Good bye\n");
  return 0;
}

        
         
