res.h->idzebra/res.h . Remove rsm_or completely. Add rsmultior.
dnl Zebra, Index Data Aps, 1995-2004
-dnl $Id: configure.in,v 1.94 2004-08-24 10:37:18 adam Exp $
+dnl $Id: configure.in,v 1.95 2004-08-25 09:23:35 adam Exp $
dnl
-AC_INIT(include/zebraver.h)
+AC_INIT(include/idzebra/version.h)
AM_INIT_AUTOMAKE(idzebra,1.4.0)
AM_PROG_LIBTOOL
dnl ------ Substitutions
recctrl/Makefile
recctrl/perlread.h
index/Makefile
- include/Makefile
+ include/Makefile include/idzebra/Makefile
tab/Makefile
doc/Makefile
doc/zebra.xml
-
+# $Id: Makefile.am,v 1.13 2004-08-25 09:23:35 adam Exp $
noinst_HEADERS = bfile.h bset.h charmap.h d1_attset.h d1_map.h \
data1.h dfa.h dict.h direntz.h isam-codec.h isamb.h isamc.h isamg.h \
isams.h mfile.h passwddb.h recctrl.h \
-res.h rsbetween.h rsbool.h rset.h rsisamb.h rsisamc.h \
-rsisams.h rsm_or.h rsnull.h rsprox.h rstemp.h set.h \
+rsbetween.h rsbool.h rset.h rsisamb.h rsisamc.h \
+rsisams.h rsmultior.h rsnull.h rsprox.h rstemp.h set.h \
sortidx.h str.h zebra-lock.h zebramap.h zebrautl.h \
zebra_xpath.h
-include_HEADERS = zebraapi.h zebraver.h
+SUBDIRS = idzebra
-/* $Id: data1.h,v 1.10 2004-08-04 08:35:23 adam Exp $
+/* $Id: data1.h,v 1.11 2004-08-25 09:23:35 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <yaz/oid.h>
#include <yaz/proto.h>
-#include <zebraver.h>
+#include <idzebra/version.h>
#include <d1_attset.h>
#include <d1_map.h>
#include <yaz/yaz-util.h>
--- /dev/null
+# $Id: Makefile.am,v 1.1 2004-08-25 09:23:36 adam Exp $
+
+pkginclude_HEADERS=api.h version.h res.h
+
--- /dev/null
+/* $Id: api.h,v 1.1 2004-08-25 09:23:36 adam Exp $
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+ Index Data Aps
+
+This file is part of the Zebra server.
+
+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
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Zebra; see the file LICENSE.zebra. If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+*/
+
+/* Return codes:
+ * Most functions return an int. Unix-like, 0 means OK,
+ * non-zero means an error. The error info should be available
+ * via zebra_errCode and friends.
+ */
+
+#ifndef ZEBRAAPI_H
+#define ZEBRAAPI_H
+
+#include <yaz/odr.h>
+#include <yaz/oid.h>
+#include <yaz/proto.h>
+#include <idzebra/res.h>
+#include <idzebra/version.h>
+
+/* Fixme! Compare string (ignore case) */
+#ifdef WIN32
+#define STRCASECMP stricmp
+#else
+#define STRCASECMP strcasecmp
+#endif
+
+YAZ_BEGIN_CDECL
+
+typedef struct {
+ int processed;
+ int inserted;
+ int updated;
+ int deleted;
+ long utime;
+ long stime;
+} ZebraTransactionStatus;
+
+/* Retrieval Record Descriptor */
+typedef struct {
+ int errCode; /* non-zero if error when fetching this */
+ char *errString; /* error string */
+ int position; /* position of record in result set (1,2,..) */
+ char *buf; /* record buffer (void pointer really) */
+ int len; /* length */
+ oid_value format; /* record syntax */
+ char *base;
+ SYSNO sysno;
+ int score;
+} ZebraRetrievalRecord;
+
+/* Scan Term Descriptor */
+typedef struct {
+ int occurrences; /* scan term occurrences */
+ char *term; /* scan term string */
+} ZebraScanEntry;
+
+typedef struct zebra_session *ZebraHandle;
+typedef struct zebra_service *ZebraService;
+
+
+/******
+ * Starting and stopping
+ */
+
+/* Start Zebra using file 'configName' (usually zebra.cfg) */
+/* There should be exactly one ZebraService */
+YAZ_EXPORT ZebraService zebra_start (const char *configName);
+YAZ_EXPORT ZebraService zebra_start_res (const char *configName,
+ Res def_res, Res over_res);
+
+/* Close the whole Zebra */
+YAZ_EXPORT int zebra_stop (ZebraService zs);
+
+
+/* Open a ZebraHandle */
+/* There should be one handle for each thred doing something */
+/* with zebra, be that searching or indexing. In simple apps */
+/* one handle is sufficient */
+YAZ_EXPORT ZebraHandle zebra_open (ZebraService zs);
+
+/* Close handle */
+YAZ_EXPORT int zebra_close (ZebraHandle zh);
+
+/*********
+ * Error handling
+ */
+
+/* last error code */
+YAZ_EXPORT int zebra_errCode (ZebraHandle zh);
+
+/* string representatio of above */
+YAZ_EXPORT const char *zebra_errString (ZebraHandle zh);
+
+/* extra information associated with error */
+YAZ_EXPORT char *zebra_errAdd (ZebraHandle zh);
+
+/* get the result code and addinfo from zh */
+YAZ_EXPORT int zebra_result (ZebraHandle zh, int *code, char **addinfo);
+/* FIXME - why is this needed?? -H */
+
+/* clear them error things */
+YAZ_EXPORT void zebra_clearError(ZebraHandle zh);
+
+/**************
+ * Searching
+ */
+
+/* Search using PQF Query */
+YAZ_EXPORT int zebra_search_PQF (ZebraHandle zh, const char *pqf_query,
+ const char *setname, int *numhits);
+
+/* Search using RPN Query */
+YAZ_EXPORT int zebra_search_RPN (ZebraHandle zh, ODR o, Z_RPNQuery *query,
+ const char *setname, int *hits);
+
+/* Retrieve record(s) */
+YAZ_EXPORT int zebra_records_retrieve (ZebraHandle zh, ODR stream,
+ const char *setname, Z_RecordComposition *comp,
+ oid_value input_format,
+ int num_recs, ZebraRetrievalRecord *recs);
+
+/* Delete Result Set(s) */
+YAZ_EXPORT int zebra_deleleResultSet(ZebraHandle zh, int function,
+ int num_setnames, char **setnames,
+ int *statuses);
+
+
+/* Browse */
+YAZ_EXPORT int zebra_scan (ZebraHandle zh, ODR stream,
+ Z_AttributesPlusTerm *zapt,
+ oid_value attributeset,
+ int *position, int *num_entries,
+ ZebraScanEntry **list,
+ int *is_partial);
+
+
+
+/*********
+ * Other
+ */
+
+/* do authentication */
+YAZ_EXPORT int zebra_auth (ZebraHandle zh, const char *user, const char *pass);
+
+/* Character normalisation on specific register .
+ This routine is subject to change - do not use. */
+YAZ_EXPORT int zebra_string_norm (ZebraHandle zh, unsigned reg_id,
+ const char *input_str, int input_len,
+ char *output_str, int output_len);
+
+
+/******
+ * Admin
+ */
+
+YAZ_EXPORT int zebra_create_database (ZebraHandle zh, const char *db);
+YAZ_EXPORT int zebra_drop_database (ZebraHandle zh, const char *db);
+
+YAZ_EXPORT int zebra_admin_shutdown (ZebraHandle zh);
+YAZ_EXPORT int zebra_admin_start (ZebraHandle zh);
+
+YAZ_EXPORT int zebra_shutdown (ZebraService zs);
+
+YAZ_EXPORT int zebra_admin_import_begin (ZebraHandle zh, const char *database,
+ const char *record_type);
+
+YAZ_EXPORT int zebra_admin_import_segment (ZebraHandle zh,
+ Z_Segment *segment);
+
+YAZ_EXPORT int zebra_admin_import_end (ZebraHandle zh);
+
+int zebra_admin_exchange_record (ZebraHandle zh,
+ const char *rec_buf,
+ size_t rec_len,
+ const char *recid_buf, size_t recid_len,
+ int action);
+
+int zebra_begin_trans (ZebraHandle zh, int rw);
+int zebra_end_trans (ZebraHandle zh);
+int zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *stat);
+
+int zebra_commit (ZebraHandle zh);
+int zebra_clean (ZebraHandle zh);
+
+int zebra_init (ZebraHandle zh);
+int zebra_compact (ZebraHandle zh);
+int zebra_repository_update (ZebraHandle zh, const char *path);
+int zebra_repository_delete (ZebraHandle zh, const char *path);
+int zebra_repository_show (ZebraHandle zh, const char *path);
+
+int zebra_add_record (ZebraHandle zh, const char *buf, int buf_size);
+
+int zebra_insert_record (ZebraHandle zh,
+ const char *recordType,
+ SYSNO *sysno, const char *match, const char *fname,
+ const char *buf, int buf_size,
+ int force_update);
+int zebra_update_record (ZebraHandle zh,
+ const char *recordType,
+ SYSNO *sysno, const char *match, const char *fname,
+ const char *buf, int buf_size,
+ int force_update);
+int zebra_delete_record (ZebraHandle zh,
+ const char *recordType,
+ SYSNO *sysno, const char *match, const char *fname,
+ const char *buf, int buf_size,
+ int force_update);
+
+YAZ_EXPORT int zebra_resultSetTerms (ZebraHandle zh, const char *setname,
+ int no, zint *count,
+ int *type, char *out, size_t *len);
+
+YAZ_EXPORT int zebra_sort (ZebraHandle zh, ODR stream,
+ int num_input_setnames,
+ const char **input_setnames,
+ const char *output_setname,
+ Z_SortKeySpecList *sort_sequence,
+ int *sort_status);
+
+YAZ_EXPORT
+int zebra_select_databases (ZebraHandle zh, int num_bases,
+ const char **basenames);
+
+YAZ_EXPORT
+int zebra_select_database (ZebraHandle zh, const char *basename);
+
+YAZ_EXPORT
+int zebra_shadow_enable (ZebraHandle zh, int value);
+
+YAZ_EXPORT
+int zebra_register_statistics (ZebraHandle zh, int dumpdict);
+
+YAZ_EXPORT
+int zebra_record_encoding (ZebraHandle zh, const char *encoding);
+
+/* Resources */
+YAZ_EXPORT
+int zebra_set_resource(ZebraHandle zh, const char *name, const char *value);
+YAZ_EXPORT
+const char *zebra_get_resource(ZebraHandle zh,
+ const char *name, const char *defaultvalue);
+
+
+YAZ_EXPORT void zebra_pidfname(ZebraService zs, char *path);
+
+YAZ_END_CDECL
+#endif
--- /dev/null
+/* $Id: res.h,v 1.1 2004-08-25 09:23:36 adam Exp $
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+ Index Data Aps
+
+This file is part of the Zebra server.
+
+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
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Zebra; see the file LICENSE.zebra. If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+*/
+
+
+
+#ifndef RES_H
+#define RES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef struct res_struct *Res;
+
+ Res res_open (const char *name, Res res_def, Res over_res);
+ void res_close (Res r);
+ const char *res_get (Res r, const char *name);
+ const char *res_get_def (Res r, const char *name, const char *def);
+ int res_get_match (Res r, const char *name, const char *value, const char *s);
+ void res_set (Res r, const char *name, const char *value);
+ int res_trav (Res r, const char *prefix, void *p,
+ void (*f)(void *p, const char *name, const char *value));
+ int res_write (Res r);
+ const char *res_get_prefix (Res r, const char *name, const char *prefix,
+ const char *def);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+/* $Id: version.h,v 1.1 2004-08-25 09:23:36 adam Exp $
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+ Index Data Aps
+
+This file is part of the Zebra server.
+
+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
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Zebra; see the file LICENSE.zebra. If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+*/
+
+#ifndef ZEBRAVER
+
+#define ZEBRAVER "1.4.0"
+
+#define ZEBRADATE "$Date: 2004-08-25 09:23:36 $"
+
+#ifdef __GNUC__
+typedef long long int zint;
+#define ZINT_FORMAT "%lld"
+#define ZINT_FORMAT0 "lld"
+#else
+#ifdef WIN32
+typedef __int64 zint;
+#define ZINT_FORMAT "%I64d"
+#define ZINT_FORMAT0 "I64d"
+#else
+typedef long zint;
+#define ZINT_FORMAT "%ld"
+#define ZINT_FORMAT0 "ld"
+#endif
+#endif
+
+typedef zint SYSNO;
+
+#endif
-/* $Id: mfile.h,v 1.22 2004-08-04 08:35:23 adam Exp $
+/* $Id: mfile.h,v 1.23 2004-08-25 09:23:35 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <stdio.h>
#include <yaz/yconfig.h>
-#include <zebraver.h>
+#include <idzebra/version.h>
#ifdef WIN32
+++ /dev/null
-/* $Id: res.h,v 1.13 2004-01-22 11:27:21 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
-
-This file is part of the Zebra server.
-
-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
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
-*/
-
-
-
-#ifndef RES_H
-#define RES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- typedef struct res_struct *Res;
-
- Res res_open (const char *name, Res res_def, Res over_res);
- void res_close (Res r);
- const char *res_get (Res r, const char *name);
- const char *res_get_def (Res r, const char *name, const char *def);
- int res_get_match (Res r, const char *name, const char *value, const char *s);
- void res_set (Res r, const char *name, const char *value);
- int res_trav (Res r, const char *prefix, void *p,
- void (*f)(void *p, const char *name, const char *value));
- int res_write (Res r);
- const char *res_get_prefix (Res r, const char *name, const char *prefix,
- const char *def);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-/* $Id: rsm_or.h,v 1.8 2004-08-20 14:44:45 heikki Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
-
-This file is part of the Zebra server.
-
-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
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
-*/
-
-
-
-#ifndef RSET_M_OR_H
-#define RSET_M_OR_H
-
-#include <rset.h>
-
-YAZ_BEGIN_CDECL
-
-extern const struct rset_control *rset_kind_m_or;
-
-typedef struct rset_m_or_parms
-{
- int key_size;
- int (*cmp)(const void *p1, const void *p2);
-
- ISAMC isc;
- ISAMC_P *isam_positions;
-
- int no_isam_positions;
- int no_save_positions;
-} rset_m_or_parms;
-
-YAZ_END_CDECL
-
-#endif
-/* $Id: sortidx.h,v 1.4 2004-08-04 08:35:23 adam Exp $
+/* $Id: sortidx.h,v 1.5 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#ifndef SORTIDX_H
#define SORTIDX_H
-#include <zebraver.h>
+#include <idzebra/version.h>
#include <bfile.h>
#ifdef __cplusplus
+++ /dev/null
-/* $Id: zebraapi.h,v 1.15 2004-08-06 13:36:22 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
-
-This file is part of the Zebra server.
-
-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
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
-*/
-
-/* Return codes:
- * Most functions return an int. Unix-like, 0 means OK,
- * non-zero means an error. The error info should be available
- * via zebra_errCode and friends.
- */
-
-#ifndef ZEBRAAPI_H
-#define ZEBRAAPI_H
-
-#include <yaz/odr.h>
-#include <yaz/oid.h>
-#include <yaz/proto.h>
-#include <res.h>
-#include <zebraver.h>
-
-/* Fixme! Compare string (ignore case) */
-#ifdef WIN32
-#define STRCASECMP stricmp
-#else
-#define STRCASECMP strcasecmp
-#endif
-
-YAZ_BEGIN_CDECL
-
-typedef struct {
- int processed;
- int inserted;
- int updated;
- int deleted;
- long utime;
- long stime;
-} ZebraTransactionStatus;
-
-/* Retrieval Record Descriptor */
-typedef struct {
- int errCode; /* non-zero if error when fetching this */
- char *errString; /* error string */
- int position; /* position of record in result set (1,2,..) */
- char *buf; /* record buffer (void pointer really) */
- int len; /* length */
- oid_value format; /* record syntax */
- char *base;
- SYSNO sysno;
- int score;
-} ZebraRetrievalRecord;
-
-/* Scan Term Descriptor */
-typedef struct {
- int occurrences; /* scan term occurrences */
- char *term; /* scan term string */
-} ZebraScanEntry;
-
-typedef struct zebra_session *ZebraHandle;
-typedef struct zebra_service *ZebraService;
-
-
-/******
- * Starting and stopping
- */
-
-/* Start Zebra using file 'configName' (usually zebra.cfg) */
-/* There should be exactly one ZebraService */
-YAZ_EXPORT ZebraService zebra_start (const char *configName);
-YAZ_EXPORT ZebraService zebra_start_res (const char *configName,
- Res def_res, Res over_res);
-
-/* Close the whole Zebra */
-YAZ_EXPORT int zebra_stop (ZebraService zs);
-
-
-/* Open a ZebraHandle */
-/* There should be one handle for each thred doing something */
-/* with zebra, be that searching or indexing. In simple apps */
-/* one handle is sufficient */
-YAZ_EXPORT ZebraHandle zebra_open (ZebraService zs);
-
-/* Close handle */
-YAZ_EXPORT int zebra_close (ZebraHandle zh);
-
-/*********
- * Error handling
- */
-
-/* last error code */
-YAZ_EXPORT int zebra_errCode (ZebraHandle zh);
-
-/* string representatio of above */
-YAZ_EXPORT const char *zebra_errString (ZebraHandle zh);
-
-/* extra information associated with error */
-YAZ_EXPORT char *zebra_errAdd (ZebraHandle zh);
-
-/* get the result code and addinfo from zh */
-YAZ_EXPORT int zebra_result (ZebraHandle zh, int *code, char **addinfo);
-/* FIXME - why is this needed?? -H */
-
-/* clear them error things */
-YAZ_EXPORT void zebra_clearError(ZebraHandle zh);
-
-/**************
- * Searching
- */
-
-/* Search using PQF Query */
-YAZ_EXPORT int zebra_search_PQF (ZebraHandle zh, const char *pqf_query,
- const char *setname, int *numhits);
-
-/* Search using RPN Query */
-YAZ_EXPORT int zebra_search_RPN (ZebraHandle zh, ODR o, Z_RPNQuery *query,
- const char *setname, int *hits);
-
-/* Retrieve record(s) */
-YAZ_EXPORT int zebra_records_retrieve (ZebraHandle zh, ODR stream,
- const char *setname, Z_RecordComposition *comp,
- oid_value input_format,
- int num_recs, ZebraRetrievalRecord *recs);
-
-/* Delete Result Set(s) */
-YAZ_EXPORT int zebra_deleleResultSet(ZebraHandle zh, int function,
- int num_setnames, char **setnames,
- int *statuses);
-
-
-/* Browse */
-YAZ_EXPORT int zebra_scan (ZebraHandle zh, ODR stream,
- Z_AttributesPlusTerm *zapt,
- oid_value attributeset,
- int *position, int *num_entries,
- ZebraScanEntry **list,
- int *is_partial);
-
-
-
-/*********
- * Other
- */
-
-/* do authentication */
-YAZ_EXPORT int zebra_auth (ZebraHandle zh, const char *user, const char *pass);
-
-/* Character normalisation on specific register .
- This routine is subject to change - do not use. */
-YAZ_EXPORT int zebra_string_norm (ZebraHandle zh, unsigned reg_id,
- const char *input_str, int input_len,
- char *output_str, int output_len);
-
-
-/******
- * Admin
- */
-
-YAZ_EXPORT int zebra_create_database (ZebraHandle zh, const char *db);
-YAZ_EXPORT int zebra_drop_database (ZebraHandle zh, const char *db);
-
-YAZ_EXPORT int zebra_admin_shutdown (ZebraHandle zh);
-YAZ_EXPORT int zebra_admin_start (ZebraHandle zh);
-
-YAZ_EXPORT int zebra_shutdown (ZebraService zs);
-
-YAZ_EXPORT int zebra_admin_import_begin (ZebraHandle zh, const char *database,
- const char *record_type);
-
-YAZ_EXPORT int zebra_admin_import_segment (ZebraHandle zh,
- Z_Segment *segment);
-
-YAZ_EXPORT int zebra_admin_import_end (ZebraHandle zh);
-
-int zebra_admin_exchange_record (ZebraHandle zh,
- const char *rec_buf,
- size_t rec_len,
- const char *recid_buf, size_t recid_len,
- int action);
-
-int zebra_begin_trans (ZebraHandle zh, int rw);
-int zebra_end_trans (ZebraHandle zh);
-int zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *stat);
-
-int zebra_commit (ZebraHandle zh);
-int zebra_clean (ZebraHandle zh);
-
-int zebra_init (ZebraHandle zh);
-int zebra_compact (ZebraHandle zh);
-int zebra_repository_update (ZebraHandle zh, const char *path);
-int zebra_repository_delete (ZebraHandle zh, const char *path);
-int zebra_repository_show (ZebraHandle zh, const char *path);
-
-int zebra_add_record (ZebraHandle zh, const char *buf, int buf_size);
-
-int zebra_insert_record (ZebraHandle zh,
- const char *recordType,
- SYSNO *sysno, const char *match, const char *fname,
- const char *buf, int buf_size,
- int force_update);
-int zebra_update_record (ZebraHandle zh,
- const char *recordType,
- SYSNO *sysno, const char *match, const char *fname,
- const char *buf, int buf_size,
- int force_update);
-int zebra_delete_record (ZebraHandle zh,
- const char *recordType,
- SYSNO *sysno, const char *match, const char *fname,
- const char *buf, int buf_size,
- int force_update);
-
-YAZ_EXPORT int zebra_resultSetTerms (ZebraHandle zh, const char *setname,
- int no, zint *count,
- int *type, char *out, size_t *len);
-
-YAZ_EXPORT int zebra_sort (ZebraHandle zh, ODR stream,
- int num_input_setnames,
- const char **input_setnames,
- const char *output_setname,
- Z_SortKeySpecList *sort_sequence,
- int *sort_status);
-
-YAZ_EXPORT
-int zebra_select_databases (ZebraHandle zh, int num_bases,
- const char **basenames);
-
-YAZ_EXPORT
-int zebra_select_database (ZebraHandle zh, const char *basename);
-
-YAZ_EXPORT
-int zebra_shadow_enable (ZebraHandle zh, int value);
-
-YAZ_EXPORT
-int zebra_register_statistics (ZebraHandle zh, int dumpdict);
-
-YAZ_EXPORT
-int zebra_record_encoding (ZebraHandle zh, const char *encoding);
-
-/* Resources */
-YAZ_EXPORT
-int zebra_set_resource(ZebraHandle zh, const char *name, const char *value);
-YAZ_EXPORT
-const char *zebra_get_resource(ZebraHandle zh,
- const char *name, const char *defaultvalue);
-
-
-YAZ_EXPORT void zebra_pidfname(ZebraService zs, char *path);
-
-YAZ_END_CDECL
-#endif
-/* $Id: zebramap.h,v 1.15 2004-07-28 09:47:41 adam Exp $
+/* $Id: zebramap.h,v 1.16 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#define ZEBRAMAP_H
#include <yaz/proto.h>
-#include <res.h>
+#include <idzebra/res.h>
YAZ_BEGIN_CDECL
-/* $Id: zebrautl.h,v 1.8 2004-08-04 08:35:23 adam Exp $
+/* $Id: zebrautl.h,v 1.9 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#define ZEBRA_UTIL_H
#include <yaz/yaz-util.h>
-#include <res.h>
-#include <zebraver.h>
+#include <idzebra/res.h>
+#include <idzebra/version.h>
YAZ_BEGIN_CDECL
zint atoi_zn (const char *buf, zint len);
+++ /dev/null
-/* $Id: zebraver.h,v 1.40 2004-08-06 12:28:22 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
-
-This file is part of the Zebra server.
-
-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
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
-*/
-
-#ifndef ZEBRAVER
-
-#define ZEBRAVER "1.4.0"
-
-#define ZEBRADATE "$Date: 2004-08-06 12:28:22 $"
-
-#ifdef __GNUC__
-typedef long long int zint;
-#define ZINT_FORMAT "%lld"
-#define ZINT_FORMAT0 "lld"
-#else
-#ifdef WIN32
-typedef __int64 zint;
-#define ZINT_FORMAT "%I64d"
-#define ZINT_FORMAT0 "I64d"
-#else
-typedef long zint;
-#define ZINT_FORMAT "%ld"
-#define ZINT_FORMAT0 "ld"
-#endif
-#endif
-
-typedef zint SYSNO;
-
-#endif
-/* $Id: apitest.c,v 1.16 2004-07-28 08:15:45 adam Exp $
+/* $Id: apitest.c,v 1.17 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
#include <yaz/log.h>
#include <yaz/pquery.h>
-#include "zebraapi.h"
+#include <idzebra/api.h>
/* Small routine to display GRS-1 record variants ... */
/* Copied verbatim from yaz/client/client.c */
-/* $Id: attribute.c,v 1.15 2004-05-26 13:52:25 adam Exp $
+/* $Id: attribute.c,v 1.16 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
#include <stdio.h>
#include <yaz/log.h>
-#include <res.h>
+#include <idzebra/res.h>
#include <zebrautl.h>
#include "index.h"
-/* $Id: index.h,v 1.113 2004-08-10 08:19:15 heikki Exp $
+/* $Id: index.h,v 1.114 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#define INDEX_H
#include <time.h>
-#include <zebraver.h>
+#include <idzebra/version.h>
#include <zebrautl.h>
#include <zebramap.h>
#include <sortidx.h>
#include <data1.h>
#include <recctrl.h>
#include "recindex.h"
-#include "zebraapi.h"
+#include <idzebra/api.h>
#include "zinfo.h"
#include <passwddb.h>
#include <rset.h>
-/* $Id: main.c,v 1.112 2004-07-28 08:15:45 adam Exp $
+/* $Id: main.c,v 1.113 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#endif
#include <data1.h>
-#include "zebraapi.h"
+#include <idzebra/api.h>
char *prog;
-/* $Id: zebraapi.c,v 1.126 2004-08-10 15:21:48 heikki Exp $
+/* $Id: zebraapi.c,v 1.127 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <yaz/sortspec.h>
#include "index.h"
#include <charmap.h>
-#include "zebraapi.h"
+#include <idzebra/api.h>
/* simple asserts to validate the most essential input args */
#define ASSERTZH assert(zh && zh->service)
-/* $Id: zebrash.c,v 1.28 2004-08-04 08:35:23 adam Exp $
+/* $Id: zebrash.c,v 1.29 2004-08-25 09:23:36 adam Exp $
Copyright (C) 2002,2003,2004
Index Data Aps
#include <readline/history.h>
#endif
-#include "zebraapi.h"
+#include <idzebra/api.h>
#include <yaz/log.h>
#include <yaz/proto.h>
#include <yaz/sortspec.h>
-/* $Id: zinfo.c,v 1.39 2004-08-06 13:36:23 adam Exp $
+/* $Id: zinfo.c,v 1.40 2004-08-25 09:23:36 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <string.h>
#include <time.h>
-#include <zebraver.h>
+#include <idzebra/version.h>
#include "zinfo.h"
#define ZINFO_DEBUG 0
-/* $Id: zinfo.h,v 1.17 2004-08-06 13:36:23 adam Exp $
+/* $Id: zinfo.h,v 1.18 2004-08-25 09:23:38 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
#define ZINFO_H
#include <data1.h>
-#include "zebraapi.h"
+#include <idzebra/api.h>
#include "recindex.h"
YAZ_BEGIN_CDECL
-/* $Id: zserver.h,v 1.57 2002-08-02 19:26:56 adam Exp $
+/* $Id: zserver.h,v 1.58 2004-08-25 09:23:38 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
#include <yaz/backend.h>
#include <yaz/charneg.h>
-#include "zebraapi.h"
+#include <idzebra/api.h>
YAZ_BEGIN_CDECL
-## $Id: Makefile.am,v 1.11 2004-08-24 10:37:18 adam Exp $
+## $Id: Makefile.am,v 1.12 2004-08-25 09:23:38 adam Exp $
lib_LTLIBRARIES = libidzebra-rset.la
libidzebra_rset_la_SOURCES = rset.c rstemp.c rsnull.c rsbool.c rsbetween.c \
rsisamc.c rsmultior.c rsisams.c rsisamb.c rsprox.c
-#rsm_or.c removed
-
AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC)
-/* $Id: t1.c,v 1.7 2004-07-28 08:15:47 adam Exp $
+/* $Id: t1.c,v 1.8 2004-08-25 09:23:39 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
#include <stdlib.h>
#include <yaz/log.h>
-#include <zebraapi.h>
+#include <idzebra/api.h>
/* read zebra.cfg from env var srcdir if it exists; otherwise current dir */
static ZebraService start_service()
-/* $Id: t2.c,v 1.11 2004-07-28 08:15:47 adam Exp $
+/* $Id: t2.c,v 1.12 2004-08-25 09:23:39 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <stdlib.h>
#include <yaz/log.h>
-#include <zebraapi.h>
+#include <idzebra/api.h>
/* read zebra.cfg from env var srcdir if it exists; otherwise current dir */
static ZebraService start_service()
-/* $Id: t3.c,v 1.8 2004-07-28 08:15:47 adam Exp $
+/* $Id: t3.c,v 1.9 2004-08-25 09:23:39 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <yaz/log.h>
#include <yaz/pquery.h>
-#include <zebraapi.h>
+#include <idzebra/api.h>
/* read zebra.cfg from env var srcdir if it exists; otherwise current dir */
static ZebraService start_service()
-/* $Id: t4.c,v 1.8 2004-07-28 08:15:47 adam Exp $
+/* $Id: t4.c,v 1.9 2004-08-25 09:23:39 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <yaz/log.h>
#include <yaz/pquery.h>
-#include <zebraapi.h>
+#include <idzebra/api.h>
/* read zebra.cfg from env var srcdir if it exists; otherwise current dir */
static ZebraService start_service()
-/* $Id: t5.c,v 1.5 2004-08-04 08:35:26 adam Exp $
+/* $Id: t5.c,v 1.6 2004-08-25 09:23:39 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <yaz/log.h>
#include <yaz/pquery.h>
-#include <zebraapi.h>
+#include <idzebra/api.h>
/* read zebra.cfg from env var srcdir if it exists; otherwise current dir */
static ZebraService start_service()
-/* $Id: t6.c,v 1.2 2004-08-13 13:16:52 adam Exp $
+/* $Id: t6.c,v 1.3 2004-08-25 09:23:39 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <yaz/log.h>
#include <yaz/pquery.h>
-#include <zebraapi.h>
+#include <idzebra/api.h>
+
/* read zebra.cfg from env var srcdir if it exists; otherwise current dir */
static ZebraService start_service()
{