-int dict_scan (Dict dict, char *str,
- int *before, int *after, void *client,
- int (*f)(char *name, const char *info, int pos, void *client));
+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 Operation complete. Function f returned zero value always
+ \retval 1 Operation incomplete. Function f returned a non-zero value
+ \retval -1 error
+*/
+YAZ_EXPORT
+int dict_scan(Dict dict, char *str,
+ int *before, int *after, void *client,
+ int (*f)(char *name, const char *info, int pos, void *client));