X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Findex.c;h=f1fc043967e02a4cb2013ac8d8610d891e2b121b;hb=e2483d8a9bc7fa72bac53d8af3ed215d3a1d80d0;hp=6d68292906e29bb4a6d02f2bef8dd0cd985cc907;hpb=d70498f0f232577c9aa4f4ca2207c15aa0d60ff2;p=openldap
diff --git a/servers/slapd/index.c b/servers/slapd/index.c
index 6d68292906..f1fc043967 100644
--- a/servers/slapd/index.c
+++ b/servers/slapd/index.c
@@ -1,39 +1,26 @@
/* index.c - index utilities */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software .
+ *
+ * Copyright 1998-2003 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * .
*/
#include "portable.h"
#include
+#include
#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,8 +39,9 @@ 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 {