# include "Ximage.h"

/************** CheckFontName *************/
void CheckFontName (int *argc, char **argv, char *fontname) {

  int N;

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