Added zebra_get_bfs to get BFile handle for session
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 17 Mar 2005 07:54:23 +0000 (07:54 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 17 Mar 2005 07:54:23 +0000 (07:54 +0000)
NEWS
include/idzebra/api.h
index/zebraapi.c

diff --git a/NEWS b/NEWS
index ac1300d..35e328f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 Implemented the 'equivalent' directive for .chr-files.
 
+Added zebra_get_bfs to get BFile handle for session.
+
 Added 'melm' directive to absyn format to simplify config files
 for MARC-style databases. See tab/marc21.abs for an example.
 
index 2023533..11c8829 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: api.h,v 1.14 2005-03-08 14:02:08 adam Exp $
+/* $Id: api.h,v 1.15 2005-03-17 07:54:23 adam Exp $
    Copyright (C) 1995-2005
    Index Data ApS
 
@@ -352,7 +352,7 @@ YAZ_EXPORT int zebra_sort(ZebraHandle zh, ODR stream,
 
 YAZ_EXPORT
 int zebra_select_databases(ZebraHandle zh, int num_bases, 
-                            const char **basenames);
+                          const char **basenames);
 
 YAZ_EXPORT
 int zebra_select_database(ZebraHandle zh, const char *basename);
@@ -403,5 +403,8 @@ ZebraMetaRecord *zebra_meta_records_create_range(ZebraHandle zh,
 YAZ_EXPORT
 void zebra_meta_records_destroy(ZebraHandle zh, ZebraMetaRecord *records,
                                int num);
+
+YAZ_EXPORT 
+struct BFile_struct *zebra_get_bfs(ZebraHandle zh);
 YAZ_END_CDECL                                
 #endif
index 8c49ad3..481d11a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zebraapi.c,v 1.154 2005-03-09 12:14:42 adam Exp $
+/* $Id: zebraapi.c,v 1.155 2005-03-17 07:54:23 adam Exp $
    Copyright (C) 1995-2005
    Index Data ApS
 
@@ -2159,3 +2159,9 @@ int zebra_sort_by_specstr (ZebraHandle zh, ODR stream,
     return sort_status;
 }
 
+struct BFile_struct *zebra_get_bfs(ZebraHandle zh)
+{
+    if (zh && zh->reg)
+       return zh->reg->bfs;
+    return 0;
+}