Moved zebrautl.h to idzebra/util.h.
[idzebra-moved-to-github.git] / index / zebraapi.c
index a2256f1..24ae25f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zebraapi.c,v 1.152 2005-01-23 12:36:27 adam Exp $
+/* $Id: zebraapi.c,v 1.156 2005-03-17 08:31:53 adam Exp $
    Copyright (C) 1995-2005
    Index Data ApS
 
@@ -823,7 +823,7 @@ int zebra_select_databases (ZebraHandle zh, int num_bases,
 }
 
 int zebra_search_RPN (ZebraHandle zh, ODR o,
-                      Z_RPNQuery *query, const char *setname, int *hits)
+                      Z_RPNQuery *query, const char *setname, zint *hits)
 {
     const char *max;
     zint maxhits;
@@ -1687,10 +1687,10 @@ int zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *status)
                  zh->records_processed, zh->records_inserted,
                  zh->records_updated, zh->records_deleted);
         
-        status->processed = zh->records_processed;
-        status->inserted = zh->records_inserted;
-        status->updated = zh->records_updated;
-        status->deleted = zh->records_deleted;
+        status->processed = (int) zh->records_processed;
+        status->inserted = (int) zh->records_inserted;
+        status->updated = (int) zh->records_updated;
+        status->deleted = (int) zh->records_deleted;
         
         zebra_get_state (zh, &val, &seqno);
         if (val != 'd')
@@ -2091,9 +2091,9 @@ int zebra_delete_record (ZebraHandle zh,
 */
 
 int zebra_search_PQF (ZebraHandle zh, const char *pqf_query,
-                     const char *setname, int *numhits)
+                     const char *setname, zint *numhits)
 {
-    int hits = 0;
+    zint hits = 0;
     int res = -1;
     Z_RPNQuery *query;
     ODR odr = odr_createmem(ODR_ENCODE);
@@ -2112,7 +2112,7 @@ int zebra_search_PQF (ZebraHandle zh, const char *pqf_query,
     
     odr_destroy(odr);
 
-    yaz_log(log_level, "Hits: %d",hits);
+    yaz_log(log_level, "Hits: " ZINT_FORMAT, hits);
 
     if (numhits)
        *numhits = hits;
@@ -2159,3 +2159,9 @@ int zebra_sort_by_specstr (ZebraHandle zh, ODR stream,
     return sort_status;
 }
 
+struct BFiles_struct *zebra_get_bfs(ZebraHandle zh)
+{
+    if (zh && zh->reg)
+       return zh->reg->bfs;
+    return 0;
+}