X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-ldbm%2Ffilterindex.c;h=31d9551e17a64a7bc43a5dbfa88b0c294510fb2b;hb=e002f7adb3cc38a31da59a14dc67c5715f0b0993;hp=55aada54e45e9286fa9caf83de36bdb987f9acbd;hpb=42e0d83cb3a1a1c5b25183f1ab74ce7edbe25de7;p=openldap diff --git a/servers/slapd/back-ldbm/filterindex.c b/servers/slapd/back-ldbm/filterindex.c index 55aada54e4..31d9551e17 100644 --- a/servers/slapd/back-ldbm/filterindex.c +++ b/servers/slapd/back-ldbm/filterindex.c @@ -1,27 +1,21 @@ /* filterindex.c - generate the list of candidate entries from a filter */ +#include "portable.h" + #include -#include -#include -#include + +#include +#include + #include "slap.h" #include "back-ldbm.h" -extern char *first_word(); -extern char *next_word(); -extern char *phonetic(); -extern IDList *index_read(); -extern IDList *idl_intersection(); -extern IDList *idl_union(); -extern IDList *idl_notin(); -extern IDList *idl_allids(); - -static IDList *ava_candidates(); -static IDList *presence_candidates(); -static IDList *approx_candidates(); -static IDList *list_candidates(); -static IDList *substring_candidates(); -static IDList *substring_comp_candidates(); +static IDList *ava_candidates( Backend *be, Ava *ava, int type ); +static IDList *presence_candidates( Backend *be, char *type ); +static IDList *approx_candidates( Backend *be, Ava *ava ); +static IDList *list_candidates( Backend *be, Filter *flist, int ftype ); +static IDList *substring_candidates( Backend *be, Filter *f ); +static IDList *substring_comp_candidates( Backend *be, char *type, char *val, int prepost ); /* * test_filter - test a filter against a single entry. @@ -89,7 +83,7 @@ filter_candidates( break; } - Debug( LDAP_DEBUG_TRACE, "<= filter_candidates %d\n", + Debug( LDAP_DEBUG_TRACE, "<= filter_candidates %lu\n", result ? result->b_nids : 0, 0, 0 ); return( result ); } @@ -120,7 +114,7 @@ ava_candidates( break; } - Debug( LDAP_DEBUG_TRACE, "<= ava_candidates %d\n", + Debug( LDAP_DEBUG_TRACE, "<= ava_candidates %lu\n", idl ? idl->b_nids : 0, 0, 0 ); return( idl ); } @@ -137,7 +131,7 @@ presence_candidates( idl = index_read( be, type, 0, "*" ); - Debug( LDAP_DEBUG_TRACE, "<= presence_candidates %d\n", + Debug( LDAP_DEBUG_TRACE, "<= presence_candidates %lu\n", idl ? idl->b_nids : 0, 0, 0 ); return( idl ); } @@ -174,7 +168,7 @@ approx_candidates( } } - Debug( LDAP_DEBUG_TRACE, "<= approx_candidates %d\n", + Debug( LDAP_DEBUG_TRACE, "<= approx_candidates %lu\n", idl ? idl->b_nids : 0, 0, 0 ); return( idl ); } @@ -215,7 +209,7 @@ list_candidates( } } - Debug( LDAP_DEBUG_TRACE, "<= list_candidates %d\n", + Debug( LDAP_DEBUG_TRACE, "<= list_candidates %lu\n", idl ? idl->b_nids : 0, 0, 0 ); return( idl ); } @@ -282,7 +276,7 @@ substring_candidates( } } - Debug( LDAP_DEBUG_TRACE, "<= substring_candidates %d\n", + Debug( LDAP_DEBUG_TRACE, "<= substring_candidates %lu\n", idl ? idl->b_nids : 0, 0, 0 ); return( idl ); } @@ -350,7 +344,7 @@ substring_comp_candidates( } } - Debug( LDAP_DEBUG_TRACE, "<= substring_comp_candidates %d\n", + Debug( LDAP_DEBUG_TRACE, "<= substring_comp_candidates %lu\n", idl ? idl->b_nids : 0, 0, 0 ); return( idl ); }