|
IDZEBRA 2.2.8
|
Go to the source code of this file.
Data Structures | |
| struct | MatchInfo |
Macros | |
| #define | SH(x) (((x)<<1)+1) |
Typedefs | |
| typedef unsigned | MatchWord |
Functions | |
| static int | lookup_ec (Dict dict, Dict_ptr ptr, MatchInfo *mi, MatchWord *ri_base, int pos, int(*userfunc)(char *), int range, Dict_char *prefix) |
| static MatchInfo * | prepare_match (Dict_char *pattern) |
| int | dict_lookup_ec (Dict dict, char *pattern, int range, int(*userfunc)(char *name)) |
| lookup item(s) in dictionary with error correction | |
| #define SH | ( | x | ) | (((x)<<1)+1) |
Definition at line 37 of file lookupec.c.
| typedef unsigned MatchWord |
Definition at line 30 of file lookupec.c.
| int dict_lookup_ec | ( | Dict | dict, |
| char * | p, | ||
| int | range, | ||
| int(*)(char *name) | f | ||
| ) |
lookup item(s) in dictionary with error correction
| dict | dictionary handle |
| p | string-z with lookup string |
| range | number of allowed errors(extra/substituted/missing char) |
| f | function be called for each match (NULL for no call of f) |
| 0 | OK |
| -1 | error |
Function f is called for each item matched.
Definition at line 149 of file lookupec.c.
References dict, dict_strlen(), Dict_struct::head, lookup_ec(), prepare_match(), and Dict_head::root.
|
static |
Definition at line 39 of file lookupec.c.
References Dict_struct::dbf, dict, dict_bf_readp(), DICT_bsize, DICT_EOS, DICT_nodir, lookup_ec(), MatchInfo::m, MatchInfo::s, and SH.
Referenced by dict_lookup_ec(), and lookup_ec().
Definition at line 133 of file lookupec.c.
References dict_strlen(), MatchInfo::m, and MatchInfo::s.
Referenced by dict_lookup_ec().