diff options
Diffstat (limited to 'src/myspell/htypes.hxx')
-rw-r--r-- | src/myspell/htypes.hxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/myspell/htypes.hxx b/src/myspell/htypes.hxx index ea43730..bc078c3 100644 --- a/src/myspell/htypes.hxx +++ b/src/myspell/htypes.hxx @@ -8,6 +8,16 @@ #define ROTATE(v,q) \ (v) = ((v) << (q)) | (((v) >> (32 - q)) & ((1 << (q))-1)); +// hentry options +#define H_OPT (1 << 0) +#define H_OPT_ALIASM (1 << 1) +#define H_OPT_PHON (1 << 2) + +#define HENTRY_WORD(h) &(h->word) +#define HENTRY_DATA(h) (h->var ? ((h->var & H_OPT_ALIASM) ? \ + *((char **) (&(h->word) + h->blen + 1)) : &(h->word) + h->blen + 1) : NULL) +#define HENTRY_FIND(h,p) (HENTRY_DATA(h) ? strstr(HENTRY_DATA(h), p) : NULL) + // approx. number of user defined words #define USERWORD 1000 @@ -19,9 +29,6 @@ struct hentry unsigned short * astr; // affix flag vector struct hentry * next; // next word with same hash code struct hentry * next_homonym; // next homonym word (with same hash code) -#ifdef HUNSPELL_EXPERIMENTAL - char * description; // morphological data (optional) -#endif char var; // variable fields (only for special pronounciation yet) char word; // variable-length word (8-bit or UTF-8 encoding) }; |