-int dict_lookup_grep (Dict dict, const char *p, int range, void *client,
- int *max_pos, int init_pos,
- int (*f)(char *name, const char *info, void *client));
-
+int dict_lookup_ec(Dict dict, char *p, int range, int (*f)(char *name));
+
+/** \brief regular expression search with error correction
+ \param dict dictionary handle
+ \param p regular expression string-z
+ \param range number of allowed errors(extra/substituted/missing char)
+ \param client client data pointer to be passed to match function f
+ \param max_pos on return holds maximum number of chars that match (prefix)
+ \param init_pos number of leading non-error corrected chars.
+ \param f function be called for each match
+ \retval 0 OK
+ \retval 1 OK
+ \retval -1 error (such as bad regular expression)
+*/
+YAZ_EXPORT
+int dict_lookup_grep(Dict dict, const char *p, int range, void *client,
+ int *max_pos, int init_pos,
+ int (*f)(char *name, const char *info, void *client));
+
+/** \brief dictionary scan
+ \param dict dictionary handle
+ \param str start pint term (string-z)
+ \param before number of terms to be visited preceding str
+ \param after number of terms to be visited following str
+ \param client client data pointer to be passed to match function f
+ \param f function be called for each matching term
+ \retval 0 OK, and no terms visited
+ \retval 1 OK, and some terms have been visited
+ \retval -1 error
+*/