6 // some maximum sizes for buffers
8 #define MAX_LN_LEN 16384
11 // a meaning with definition, count of synonyms and synonym list
22 int nw; /* number of entries in thesaurus */
23 char** list; /* stores word list */
24 unsigned int* offst; /* stores offset list */
25 char * encoding; /* stores text encoding; */
29 // disallow copy-constructor and assignment-operator for now
31 MyThes(const MyThes &);
32 MyThes & operator = (const MyThes &);
35 MyThes(const char* idxpath, const char* datpath);
38 // lookup text in index and return number of meanings
39 // each meaning entry has a defintion, synonym count and pointer
40 // when complete return the *original* meaning entry and count via
41 // CleanUpAfterLookup to properly handle memory deallocation
43 int Lookup(const char * pText, int len, mentry** pme);
45 void CleanUpAfterLookup(mentry** pme, int nmean);
47 char* get_th_encoding();
50 // Open index and dat files and load list array
51 int thInitialize (const char* indxpath, const char* datpath);
53 // internal close and cleanup dat and idx files
56 // read a text line (\n terminated) stripping off line terminator
57 int readLine(FILE * pf, char * buf, int nc);
59 // binary search on null terminated character strings
60 int binsearch(char * wrd, char* list[], int nlst);