/*============================================================
Decryptoquip version 5.0
(C) 1998 by Edwin Olson eolson@mit.edu 
============================================================*/
#define D5_COPYRIGHTSTRING "Decryptoquip v5.0 by Edwin Olson, eolson@mit.edu"

typedef struct
{
  int len;
  char *word;
  char *pattern;
  int use;
  char **dict;
  long numdictwords;
  float score;
} D5_Word;

typedef struct 
{
  char *cipherstring;
  char *cluestring;
  char *dictionaryname;
  char cluemap[256];
  char cluemappedmap[256];
  FILE *file;
  
  D5_Word *word;
  int numwords;
  char bigmap[26][26];
  
  int totalwordsloaded;
  long entropycount;
} D5_PuzzleObject;

typedef D5_PuzzleObject *D5_Puzzle;

/*============================================================
  User callable function
  ============================================================*/
void D5_setCipherString(D5_Puzzle puzzle, char *in);
void D5_setClueString(D5_Puzzle puzzle, char *in);
D5_Puzzle D5_createPuzzle(void);
void D5_wordSolve(D5_Puzzle puzzle);
void D5_letterAnalyze(D5_Puzzle puzzle);
void D5_sortWords(D5_Puzzle puzzle);
float D5_getEstimatedEntropy(D5_Puzzle puzzle);
float D5_getActualEntropy(D5_Puzzle puzzle);
