#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xlocale.h>
#include <X11/Xos.h>
#include <stdio.h>
#include "dsimple.h"

XFontSet  fontset;
char      **ml;
int       mc;
char      *ds;
XFontStruct **fs_list;

void
usage() {
  printf("%s","Usage not written yet.\n");
  exit(0);
}

int
main(argc, argv)
int argc;
char **argv;    
{

	INIT_NAME;

	setlocale(LC_CTYPE, "");
	/* Handle command line arguments, open display */
	Setup_Display_And_Screen(&argc, argv);
	argv++; argc--;
	if (!argc) {
	  fprintf(stderr, "Huh?\n");
	  exit(1);
	}

	if ((fontset = XCreateFontSet(dpy,argv[0],&ml,&mc,&ds))==NULL) {
	  fprintf(stdout, "Couldn't get fontset '%s'\n", argv[0]);
	} else {
	  XFontsOfFontSet(fontset, &fs_list, &ml);
	  fprintf(stdout, "Fontset '%s' in locale '%s' contains\n", argv[0],
             XLocaleOfFontSet(fontset));
	  fprintf(stdout, "  %s\nas its first font.\n", *ml);
	}

	exit(0);
}
