summaryrefslogtreecommitdiff
path: root/src/hunspell/dictmgr.hxx
blob: bb197f84fb2ba8b24197cb6db7d14a0b276fae12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _DICTMGR_HXX_
#define _DICTMGR_HXX_

#include "hunvisapi.h"

#define MAXDICTIONARIES 100
#define MAXDICTENTRYLEN 1024

struct dictentry {
  char * filename;
  char * lang;
  char * region;
};


class LIBHUNSPELL_DLL_EXPORTED DictMgr
{

  int                 numdict;
  dictentry *         pdentry;

public:
 
  DictMgr(const char * dictpath, const char * etype);
  ~DictMgr();
  int get_list(dictentry** ppentry);
            
private:
  int  parse_file(const char * dictpath, const char * etype);
  char * mystrsep(char ** stringp, const char delim);
  char * mystrdup(const char * s);
  void mychomp(char * s);

};

#endif