dictmgr.hxx 633 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _DICTMGR_HXX_
  2. #define _DICTMGR_HXX_
  3. #include "hunvisapi.h"
  4. #define MAXDICTIONARIES 100
  5. #define MAXDICTENTRYLEN 1024
  6. struct dictentry {
  7. char * filename;
  8. char * lang;
  9. char * region;
  10. };
  11. class LIBHUNSPELL_DLL_EXPORTED DictMgr
  12. {
  13. int numdict;
  14. dictentry * pdentry;
  15. public:
  16. DictMgr(const char * dictpath, const char * etype);
  17. ~DictMgr();
  18. int get_list(dictentry** ppentry);
  19. private:
  20. int parse_file(const char * dictpath, const char * etype);
  21. char * mystrsep(char ** stringp, const char delim);
  22. char * mystrdup(const char * s);
  23. void mychomp(char * s);
  24. };
  25. #endif