X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Findex.c;h=4ee35194426b0e4164cd8b21750ef0a72bc4ff60;hb=ca9bb44089145bdb7435135714590d48f4a6eabd;hp=786ccb388a1fa7b66420e58633ad7745253918b1;hpb=0e2af54a3ffdeebe3901370683be56fcc53023b0;p=openldap diff --git a/servers/slapd/index.c b/servers/slapd/index.c index 786ccb388a..4ee3519442 100644 --- a/servers/slapd/index.c +++ b/servers/slapd/index.c @@ -1,7 +1,7 @@ /* index.c - index utilities */ /* $OpenLDAP$ */ /* - * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ @@ -11,29 +11,6 @@ #include "slap.h" -int -slap_index2prefix( int indextype ) -{ - int prefix; - - switch ( indextype ) { - case SLAP_INDEX_EQUALITY: - prefix = SLAP_INDEX_EQUALITY_PREFIX; - break; - case SLAP_INDEX_APPROX: - prefix = SLAP_INDEX_APPROX_PREFIX; - break; - case SLAP_INDEX_SUBSTR: - prefix = SLAP_INDEX_SUBSTR_PREFIX; - break; - default: - prefix = SLAP_INDEX_UNKNOWN_PREFIX; - break; - } - - return( prefix ); -} - int slap_str2index( const char *str, slap_mask_t *idx ) { if ( strcasecmp( str, "pres" ) == 0 ) { @@ -52,12 +29,11 @@ int slap_str2index( const char *str, slap_mask_t *idx ) strcasecmp( str, "sub" ) == 0 ) { *idx = SLAP_INDEX_SUBSTR_DEFAULT; - } else if ( strcasecmp( str, "nolang" ) == 0 ) { - *idx = SLAP_INDEX_NOLANG; + } else if ( strcasecmp( str, "nolang" ) == 0 || /* backwards compat */ + strcasecmp( str, "notags" ) == 0 ) { + *idx = SLAP_INDEX_NOTAGS; } else if ( strcasecmp( str, "nosubtypes" ) == 0 ) { *idx = SLAP_INDEX_NOSUBTYPES; - } else if ( strcasecmp( str, "autosubtypes" ) == 0 ) { - *idx = SLAP_INDEX_AUTO_SUBTYPES; } else { return LDAP_OTHER; }