/************************************************************/
/*         File Name: Xtrctmis.c                            */
/*         Package:   NIST MIS Extraction Utility           */
/*         Author:    Michael D. Garris                     */
/*         Date:      1/17/92                               */
/************************************************************/
#include <stdio.h>
#include <memory.h>
#include <ihead.h>
#include <mis.h>

/************************************************************/
/* Takes a NIST MIS file and extracts the character image   */
/* at the postion defined by the parameter "index" and      */
/* stores it to the specified file, "outfile".              */
/************************************************************/
main(argc,argv)
int argc;
char *argv[];
{
   char *misfile, *outfile;
   int index;

   procargs(argc, argv, &misfile, &outfile, &index);
   xtrctmis(misfile, outfile, index);
}

procargs(argc, argv, misfile, outfile, index)
int argc, *index;
char *argv[], **misfile, **outfile;
{
  if (argc != 4)
     fatalerr("Usage", argv[0], "<misfile> <outfile> <index>");
  *misfile = argv[1];
  *outfile = argv[2];
  sscanf(argv[3], "%d", index);
}
