/* *Representsanentryinawordslist.
*/ typedefstruct spell_struct
{ union
{ /* *flagisfilledinbyNIImportDictionary().After *NISortDictionary(),disusedinsteadofflag.
*/ constchar *flag; /* d is used in mkSPNode() */ struct
{ /* Reference to an entry of the AffixData field */ int affix; /* Length of the word */ int len;
} d;
} p; char word[FLEXIBLE_ARRAY_MEMBER];
} SPELL;
typedefstruct
{ constchar *affix; int len; bool issuffix;
} CMPDAffix;
/* *TypeofencodingaffixflagsinHunspelldictionaries
*/ typedefenum
{
FM_CHAR, /* one character (like ispell) */
FM_LONG, /* two characters */
FM_NUM, /* number, >= 0 and < 65536 */
} FlagMode;
/* *StructuretostoreHunspelloptions.Flagrepresentationdependsonflag *type.Theseflagsareaboutsupportofcompoundwords.
*/ typedefstruct CompoundAffixFlag
{ union
{ /* Flag name if flagMode is FM_CHAR or FM_LONG */ constchar *s; /* Flag name if flagMode is FM_NUM */
uint32 i;
} flag; /* we don't have a bsearch_arg version, so, copy FlagMode */
FlagMode flagMode;
uint32 value;
} CompoundAffixFlag;
#define FLAGNUM_MAXSIZE (1 << 16)
typedefstruct
{ int maffixes; int naffixes;
AFFIX *Affix;
AffixNode *Suffix;
AffixNode *Prefix;
SPNode *Dictionary; /* Array of sets of affixes */ constchar **AffixData; int lenAffixData; int nAffixData; bool useFlagAliases;
/* Array of Hunspell options in affix file */
CompoundAffixFlag *CompoundAffixFlags; /* number of entries in CompoundAffixFlags array */ int nCompoundAffixFlag; /* allocated length of CompoundAffixFlags array */ int mCompoundAffixFlag;
/* *Remainingfieldsareonlyusedduringdictionaryconstruction;theyare *setupbyNIStartBuildandclearedbyNIFinishBuild.
*/
MemoryContext buildCxt; /* temp context for construction */
/* Temporary array of all words in the dict file */
SPELL **Spell; int nspell; /* number of valid entries in Spell array */ int mspell; /* allocated length of Spell array */
/* These are used to allocate "compact" data without palloc overhead */ char *firstfree; /* first free address (always maxaligned) */
size_t avail; /* free space remaining at firstfree */
} IspellDict;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.