]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/filterindex.c
Code clean-up.
[openldap] / servers / slapd / back-ldbm / filterindex.c
index 21a9d6ef7c44e0bd60aad7ae7ced7ea2db761f94..2c32d50d9fe734ee4000a84b8577dd7a62100f0b 100644 (file)
 #include "slap.h"
 #include "back-ldbm.h"
 
-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 );
+static ID_BLOCK        *ava_candidates( Backend *be, Ava *ava, int type );
+static ID_BLOCK        *presence_candidates( Backend *be, char *type );
+static ID_BLOCK        *approx_candidates( Backend *be, Ava *ava );
+static ID_BLOCK        *list_candidates( Backend *be, Filter *flist, int ftype );
+static ID_BLOCK        *substring_candidates( Backend *be, Filter *f );
+static ID_BLOCK        *substring_comp_candidates( Backend *be, char *type, char *val, int prepost );
 
 /*
  * test_filter - test a filter against a single entry.
@@ -24,13 +24,13 @@ static IDList       *substring_comp_candidates( Backend *be, char *type, char *val, in
  *             >0      an ldap error code
  */
 
-IDList *
+ID_BLOCK *
 filter_candidates(
     Backend    *be,
     Filter     *f
 )
 {
-       IDList  *result, *tmp1, *tmp2;
+       ID_BLOCK        *result, *tmp1, *tmp2;
 
        Debug( LDAP_DEBUG_TRACE, "=> filter_candidates\n", 0, 0, 0 );
 
@@ -86,19 +86,19 @@ filter_candidates(
                break;
        }
 
-       Debug( LDAP_DEBUG_TRACE, "<= filter_candidates %lu\n",
-           result ? result->b_nids : 0, 0, 0 );
+       Debug( LDAP_DEBUG_TRACE, "<= filter_candidates %ld\n",
+           result ? ID_BLOCK_NIDS(result) : 0, 0, 0 );
        return( result );
 }
 
-static IDList *
+static ID_BLOCK *
 ava_candidates(
     Backend    *be,
     Ava                *ava,
     int                type
 )
 {
-       IDList  *idl;
+       ID_BLOCK        *idl;
 
        Debug( LDAP_DEBUG_TRACE, "=> ava_candidates 0x%x\n", type, 0, 0 );
 
@@ -117,36 +117,36 @@ ava_candidates(
                break;
        }
 
-       Debug( LDAP_DEBUG_TRACE, "<= ava_candidates %lu\n",
-           idl ? idl->b_nids : 0, 0, 0 );
+       Debug( LDAP_DEBUG_TRACE, "<= ava_candidates %ld\n",
+           idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
        return( idl );
 }
 
-static IDList *
+static ID_BLOCK *
 presence_candidates(
     Backend    *be,
     char       *type
 )
 {
-       IDList  *idl;
+       ID_BLOCK        *idl;
 
        Debug( LDAP_DEBUG_TRACE, "=> presence_candidates\n", 0, 0, 0 );
 
        idl = index_read( be, type, 0, "*" );
 
-       Debug( LDAP_DEBUG_TRACE, "<= presence_candidates %lu\n",
-           idl ? idl->b_nids : 0, 0, 0 );
+       Debug( LDAP_DEBUG_TRACE, "<= presence_candidates %ld\n",
+           idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
        return( idl );
 }
 
-static IDList *
+static ID_BLOCK *
 approx_candidates(
     Backend    *be,
     Ava                *ava
 )
 {
        char    *w, *c;
-       IDList  *idl, *tmp;
+       ID_BLOCK        *idl, *tmp;
 
        Debug( LDAP_DEBUG_TRACE, "=> approx_candidates\n", 0, 0, 0 );
 
@@ -171,19 +171,19 @@ approx_candidates(
                }
        }
 
-       Debug( LDAP_DEBUG_TRACE, "<= approx_candidates %lu\n",
-           idl ? idl->b_nids : 0, 0, 0 );
+       Debug( LDAP_DEBUG_TRACE, "<= approx_candidates %ld\n",
+           idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
        return( idl );
 }
 
-static IDList *
+static ID_BLOCK *
 list_candidates(
     Backend    *be,
     Filter     *flist,
     int                ftype
 )
 {
-       IDList  *idl, *tmp, *tmp2;
+       ID_BLOCK        *idl, *tmp, *tmp2;
        Filter  *f;
 
        Debug( LDAP_DEBUG_TRACE, "=> list_candidates 0x%x\n", ftype, 0, 0 );
@@ -212,19 +212,19 @@ list_candidates(
                }
        }
 
-       Debug( LDAP_DEBUG_TRACE, "<= list_candidates %lu\n",
-           idl ? idl->b_nids : 0, 0, 0 );
+       Debug( LDAP_DEBUG_TRACE, "<= list_candidates %ld\n",
+           idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
        return( idl );
 }
 
-static IDList *
+static ID_BLOCK *
 substring_candidates(
     Backend    *be,
     Filter     *f
 )
 {
        int     i;
-       IDList  *idl, *tmp, *tmp2;
+       ID_BLOCK        *idl, *tmp, *tmp2;
 
        Debug( LDAP_DEBUG_TRACE, "=> substring_candidates\n", 0, 0, 0 );
 
@@ -279,12 +279,12 @@ substring_candidates(
                }
        }
 
-       Debug( LDAP_DEBUG_TRACE, "<= substring_candidates %lu\n",
-           idl ? idl->b_nids : 0, 0, 0 );
+       Debug( LDAP_DEBUG_TRACE, "<= substring_candidates %ld\n",
+           idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
        return( idl );
 }
 
-static IDList *
+static ID_BLOCK *
 substring_comp_candidates(
     Backend    *be,
     char       *type,
@@ -293,7 +293,7 @@ substring_comp_candidates(
 )
 {
        int     i, len;
-       IDList  *idl, *tmp, *tmp2;
+       ID_BLOCK        *idl, *tmp, *tmp2;
        char    *p;
        char    buf[SUBLEN + 1];
 
@@ -347,7 +347,7 @@ substring_comp_candidates(
                }
        }
 
-       Debug( LDAP_DEBUG_TRACE, "<= substring_comp_candidates %lu\n",
-           idl ? idl->b_nids : 0, 0, 0 );
+       Debug( LDAP_DEBUG_TRACE, "<= substring_comp_candidates %ld\n",
+           idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
        return( idl );
 }