author | viric@llimona |
Sat, 01 Sep 2007 01:19:18 +0200 | |
changeset 16 | b4e251400e36 |
parent 15 | 17a66ceb774a |
child 17 | d95d9e7a2b81 |
permissions | -rw-r--r-- |
10 | 1 |
enum { |
14 | 2 |
MAXWORD=200, |
3 |
MAXDEF=10000 |
|
10 | 4 |
}; |
5 |
||
15 | 6 |
enum Case |
7 |
{ |
|
8 |
LCASE = 0, |
|
9 |
UCASE = 1 |
|
10 |
}; |
|
11 |
||
0 | 12 |
struct Words |
13 |
{ |
|
14 |
struct Word *first; |
|
15 |
int length; |
|
16 |
}; |
|
17 |
||
18 |
struct Word |
|
19 |
{ |
|
20 |
char *w; |
|
21 |
int def; |
|
22 |
}; |
|
23 |
||
24 |
struct Def |
|
25 |
{ |
|
26 |
char *d; |
|
27 |
int offset; |
|
28 |
int length; |
|
29 |
}; |
|
30 |
||
31 |
/* write.c */ |
|
32 |
void write_dictionary(const char *name); |
|
33 |
||
34 |
/* dict.c */ |
|
35 |
char * get_word(FILE *index); |
|
36 |
int get_int(FILE *index); |
|
37 |
char * get_def(FILE *fdefs, int offset, int length); |
|
8
09ec33061ff3
Added 'ia5' binary, and fixed the ia5 functions.
viric@llimona
parents:
5
diff
changeset
|
38 |
int str2int(const char *str); |
09ec33061ff3
Added 'ia5' binary, and fixed the ia5 functions.
viric@llimona
parents:
5
diff
changeset
|
39 |
int num_to_ia5(char *dest, int n); |
0 | 40 |
|
41 |
/* filter.c */ |
|
42 |
void filter_all(const char *filter_par); |
|
43 |
||
44 |
/* sort.c */ |
|
45 |
int sort_words(); |
|
46 |
/* load.c */ |
|
47 |
void load_init(); |
|
48 |
void load_dictionary(FILE *index, FILE *fdefs); |
|
49 |
void print_words(); |
|
2 | 50 |
|
51 |
/* fastmalloc */ |
|
52 |
void * fastmalloc(int newsize); |
|
5 | 53 |
|
54 |
/* repeated.c */ |
|
55 |
void new_hashdef(struct Def *ptr, int index); |
|
56 |
int def_repeated(struct Def *ptr); |
|
57 |
void init_repeated(); |
|
58 |
void remove_def(int i); |
|
10 | 59 |
|
60 |
||
61 |
/* FOR ZPROCESS */ |
|
62 |
/* zdefs.c */ |
|
63 |
void zprocess_def(const char *root, char *def); |
|
64 |
||
65 |
||
66 |
/* zhash.c */ |
|
67 |
void insert_word(const char *word, const char *unflexed); |
|
68 |
void init_wordlist(); |
|
69 |
void dump_wordlist(); |
|
70 |
||
71 |
/* zrus.c */ |
|
72 |
char * mix_accents(char *a, const char *b); |
|
73 |
void remove_accent(unsigned char *dest, const unsigned char *from); |
|
14 | 74 |
int until_newword(const unsigned char *str, int *index); |
75 |
int until_noword(const char *str, int *index); |
|
76 |
int skip_newline(const char *str, int *index); |
|
77 |
int is_ASCII(unsigned char c); |
|
15 | 78 |
int get_case(enum Case *vcase, const char *str); |
79 |
void get_lowcase_str(char *inout, const char *str); |
|
80 |
void reapply_case(char *out, const char *in, const enum Case *vcase); |
|
16
b4e251400e36
Improved hash on zprocess, and added parsing for "jo".
viric@llimona
parents:
15
diff
changeset
|
81 |
void remove_jo(char *str); |
14 | 82 |
|
83 |
/* find.c */ |
|
84 |
void find_def(const char *word, char * def); |