antoine-source/appleworksgs/Spell/Inc/CORELEX.H
2023-03-04 03:45:20 +01:00

1 line
2.0 KiB
C
Executable File

/***********************************************************************\
Filename: corelex.h
\***********************************************************************/
#ifndef _CORELEX
#define _CORELEX
#ifndef _PROXLIB
#include <proxlib.h>
#endif
#define MAXCORWORD 16 /* maximum length of word in the Corelex */
/* These codes must be the same as those of SC. */
#define CLX_NOTFOUND 0 /* code returned when word is not found */
#define CLX_COMMON 1 /* code for unflagged word */
#define CLX_PROPER 2 /* code for first letter capitalized */
#define CLX_ACRONYM 3 /* code for all letters capitalized */
/* header of the Corelex file */
#define CLXVERSION 0 /* the Corelex version */
#define CLXCHARS 2 /* number of header characters to read */
#define CLXSHORTS 6 /* number of header shorts to read */
extern char Clxversion; /* the Corelex version code */
extern char Clxenv; /* the langauge code for the Corelex */
extern short Clxbwords; /* words per bin */
extern USHORT Clxnlenbin; /* number of cx_lenbin's */
extern USHORT Clxnflags; /* number of cx_flags's */
extern USHORT Clxnlettab; /* number of cx_lettab's */
extern USHORT Clxbins; /* number of cx_bintab's */
extern USHORT Clxndata; /* number of cx_data's */
/* Main corelex structure */
extern USHORT *Clxlenbin; /* bin number of length partitions */
extern char *Clxflags; /* flags in the Corelex; upto 15 possible */
extern char *Clxlettab; /* freq sorted, letters used in the list */
extern USHORT *Clxbintab; /* table of byte offsets to Corelex bins */
extern UCHAR **Clxdata; /* compressed wordlist (4-bit "nibbles") */
extern int clxword(); /* Look up a word */
extern VOID clxtypo(); /* Do typo correction */
extern int clxread(); /* Read a corelex from disk */
extern VOID clxfree(); /* Free corelex memory */
#endif /* _CORELEX */