# include "Ximage.h"

/************** CheckDisplayName *************/
void CheckDisplayName (int *argc, char **argv, char *display_name) {

  int N;

  display_name[0] = 0;
  if ((N = get_argument (*argc, argv, "-d"))) {
    if (N + 1 < *argc) {
      strcpy (display_name, argv[N + 1]);
      remove_argument(N, argc, argv);
      remove_argument(N, argc, argv);
    } else {
      fprintf (stderr, "error: usage is [-display/-d] DisplayName\n");
      exit (0);
    }
  }
  if ((N = get_argument (*argc, argv, "-display"))) {
    if (N + 1 < *argc) {
      strcpy (display_name, argv[N + 1]);
      remove_argument(N, argc, argv);
      remove_argument(N, argc, argv);
    } else {
      fprintf (stderr, "error: usage is [-display/-d] DisplayName\n");
      exit (0);
    }
  }
}

