IDZEBRA
2.2.7
|
Go to the source code of this file.
Functions | |
static void | scan_direction (Dict dict, Dict_ptr ptr, int pos, Dict_char *str, int start, int *count, void *client, int(*userfunc)(char *, const char *, int, void *), int dir) |
void | dict_scan_r (Dict dict, Dict_ptr ptr, int pos, Dict_char *str, int *before, int *after, void *client, int(*userfunc)(char *, const char *, int, void *)) |
int | dict_scan (Dict dict, char *str, int *before, int *after, void *client, int(*f)(char *name, const char *info, int pos, void *client)) |
dictionary scan More... | |
int dict_scan | ( | Dict | dict, |
char * | str, | ||
int * | before, | ||
int * | after, | ||
void * | client, | ||
int(*)(char *name, const char *info, int pos, void *client) | f | ||
) |
dictionary scan
dict | dictionary handle |
str | start pint term (string-z) |
before | number of terms to be visited preceding str |
after | number of terms to be visited following str |
client | client data pointer to be passed to match function f |
f | function be called for each matching term |
0 | Successful |
-1 | error |
If the callback function f returns 0 the scan operation visits all terms in range (before to after); if the function returns non-zero the scan operation is cancelled.
Definition at line 242 of file scan.c.
References dict, dict_scan_r(), Dict_struct::head, and Dict_head::root.
Referenced by dirs_open(), dirs_read(), do_scan(), main(), rpn_scan_norm(), and zebra_register_statistics().
void dict_scan_r | ( | Dict | dict, |
Dict_ptr | ptr, | ||
int | pos, | ||
Dict_char * | str, | ||
int * | before, | ||
int * | after, | ||
void * | client, | ||
int(*)(char *, const char *, int, void *) | userfunc | ||
) |
Definition at line 124 of file scan.c.
References Dict_struct::dbf, dict, dict_bf_readp(), DICT_bsize, DICT_EOS, DICT_nodir, dict_strcmp(), dict_strlen(), and scan_direction().
Referenced by dict_scan().
|
static |
Definition at line 31 of file scan.c.
References Dict_struct::dbf, dict, dict_bf_readp(), DICT_bsize, DICT_EOS, and DICT_nodir.
Referenced by dict_scan_r().