#include "Node.h"
#include "options.h"

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int   opt_d= 0;
oop   opt_I= 0;
char *opt_o= 0;
int   opt_v= 0;

void parseOptions(int &argc, char **&argv)
{
  int c;
  while (-1 != (c= getopt(argc, argv, "dI:o:v")))
    switch (c)
      {
      case 'd': ++opt_d;	break;

      case 'I':
	if (!opt_I) opt_I= new OrderedCollection();
	opt_I->add(new String(optarg));
	break;

      case 'o': opt_o= optarg;	break;
      case 'v': ++opt_v;	break;

      default:
	exit(1);
	break;
      }
  argc -= optind;
  argv += optind;
}
