Remove obsolete references
[idzebra-moved-to-github.git] / index / zinfo.c
index d086ff2..cfede29 100644 (file)
@@ -1,8 +1,5 @@
-/* $Id: zinfo.c,v 1.80 2007-10-29 16:57:53 adam Exp $
-   Copyright (C) 1995-2007
-   Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+   Copyright (C) 1994-2011 Index Data
 
 Zebra is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -20,6 +17,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 */
 
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <sys/types.h>
 #include <assert.h>
 #include <stdlib.h>
@@ -770,12 +770,12 @@ int zebraExplain_removeDatabase(ZebraExplainInfo zei, void *update_handle)
                
                rec = rec_get(zei->records, zad->sysno);
                (*zei->updateFunc)(zei->updateHandle, rec, 0);
-               rec_free(&rec);
+               rec_del(zei->records, &rec);
            }
            /* remove database record keys and delete it */
            rec = rec_get(zei->records, zdi->sysno);
            (*zei->updateFunc)(zei->updateHandle, rec, 0);
-           rec_free(&rec);
+           rec_del(zei->records, &rec);
 
            /* remove from list */
            *zdip = zdi->next;
@@ -998,7 +998,7 @@ static void zebraExplain_writeCategoryList(ZebraExplainInfo zei,
     assert(zcl);
     if (!zcl->dirty)
        return ;
-    zcl->dirty = 1;
+    zcl->dirty = 0;
     node_categoryList = zcl->data1_categoryList;
 
 #if ZINFO_DEBUG
@@ -1379,14 +1379,19 @@ int zebraExplain_lookup_attr_str(ZebraExplainInfo zei,
 }
 
 int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle,
-                         int (*f)(void *handle, int ord))
+                         int (*f)(void *handle, int ord,
+                                   const char *index_type,
+                                   const char *string_index,
+                                   zinfo_index_category_t cat))
 {
     struct zebDatabaseInfoB *zdb = zei->curDatabaseInfo;
     if (zdb)
     {
        struct zebSUInfoB *zsui = zdb->attributeDetails->SUInfo;
        for ( ;zsui; zsui = zsui->next)
-           (*f)(handle,  zsui->info.ordinal);
+           (*f)(handle,  zsui->info.ordinal,
+                 zsui->info.index_type, zsui->info.str,
+                 zsui->info.cat);
     }
     return 0;
 }
@@ -1636,6 +1641,7 @@ void zebraExplain_loadAttsets(data1_handle dh, Res res)
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab