# include "delstar.h"

void help () {

  fprintf (stderr, "USAGE: delstar (filename) or (start range) or -orphan (region)\n");
  fprintf (stderr, "  optional flags:\n");
  fprintf (stderr, "  -v (verbose mode)\n");
  fprintf (stderr, "\n"); 
  exit (2);

}

int args (int *argc, char **argv) {
  

  int N;

  ConfigInit (argc, argv);

  /* check for help request */
  if (get_argument (*argc, argv, "-help") ||
      get_argument (*argc, argv, "-h")) {
    help ();
  }

  VERBOSE = FALSE;
  if ((N = get_argument (*argc, argv, "-v"))) {
    VERBOSE = TRUE;
    remove_argument (N, argc, argv);
  }

  ORPHAN = FALSE;
  if ((N = get_argument (*argc, argv, "-orphan"))) {
    ORPHAN = TRUE;
    remove_argument (N, argc, argv);
  }

  MISSED = FALSE;
  if ((N = get_argument (*argc, argv, "-missed"))) {
    MISSED = TRUE;
    remove_argument (N, argc, argv);
  }

  if ((*argc != 2) && (*argc != 3)) {
    fprintf (stderr, "ERROR: Usage: delstar (filename) or (start range) or -orphan (region)\n");
    exit (2);
  }

}
