From: Adam Dickmeiss Date: Wed, 8 Dec 2004 14:02:36 +0000 (+0000) Subject: Moved isam headers to include/idzebra. X-Git-Tag: snippet.version.1~225 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=0e56fa84bb4a5985c19a21926e86862c08d84689 Moved isam headers to include/idzebra. --- diff --git a/include/Makefile.am b/include/Makefile.am index 30fd7a0..c6d653a 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,7 +1,6 @@ -# $Id: Makefile.am,v 1.19 2004-12-08 13:48:12 adam Exp $ +# $Id: Makefile.am,v 1.20 2004-12-08 14:02:36 adam Exp $ noinst_HEADERS = bset.h charmap.h \ -direntz.h isam-codec.h isamb.h isamc.h \ -isams.h passwddb.h dfa.h zebra_xpath.h d1_absyn.h \ +direntz.h passwddb.h dfa.h zebra_xpath.h d1_absyn.h \ rset.h set.h sortidx.h str.h zebra-lock.h zebrautl.h SUBDIRS = idzebra diff --git a/include/idzebra/Makefile.am b/include/idzebra/Makefile.am index bd15739..52efdff 100644 --- a/include/idzebra/Makefile.am +++ b/include/idzebra/Makefile.am @@ -1,4 +1,5 @@ -# $Id: Makefile.am,v 1.4 2004-12-08 12:23:09 adam Exp $ +# $Id: Makefile.am,v 1.5 2004-12-08 14:02:36 adam Exp $ -pkginclude_HEADERS=api.h version.h res.h recctrl.h data1.h recgrs.h zebramap.h bfile.h dict.h +pkginclude_HEADERS=api.h version.h res.h recctrl.h data1.h recgrs.h \ + zebramap.h bfile.h dict.h isam-codec.h isams.h isamc.h isamb.h diff --git a/include/idzebra/isam-codec.h b/include/idzebra/isam-codec.h new file mode 100644 index 0000000..932d492 --- /dev/null +++ b/include/idzebra/isam-codec.h @@ -0,0 +1,34 @@ +/* $Id: isam-codec.h,v 1.1 2004-12-08 14:02:36 adam Exp $ + Copyright (C) 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 ISAM_CODEC_H +#define ISAM_CODEC_H + +typedef struct { + void *(*start)(); + void (*stop)(void *p); + void (*decode)(void *p, char **dst, const char **src); + void (*encode)(void *p, char **dst, const char **src); + void (*reset)(void *p); +} ISAM_CODEC; + +#endif diff --git a/include/idzebra/isamb.h b/include/idzebra/isamb.h new file mode 100644 index 0000000..3bb7491 --- /dev/null +++ b/include/idzebra/isamb.h @@ -0,0 +1,62 @@ +/* $Id: isamb.h,v 1.1 2004-12-08 14:02: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 ISAMB_H +#define ISAMB_H + +#include +#include + +YAZ_BEGIN_CDECL + +typedef struct ISAMB_s *ISAMB; +typedef struct ISAMB_PP_s *ISAMB_PP; +typedef ISAMC_P ISAMB_P; + +ISAMB isamb_open (BFiles bfs, const char *name, int writeflag, ISAMC_M *method, + int cache); +void isamb_close (ISAMB isamb); + +ISAMB_P isamb_merge (ISAMB b, ISAMB_P pos, ISAMC_I *data); + +ISAMB_PP isamb_pp_open (ISAMB isamb, ISAMB_P pos, int scope); + +int isamb_pp_read (ISAMB_PP pp, void *buf); + +int isamb_pp_forward (ISAMB_PP pp, void *buf, const void *untilbuf); + +void isamb_pp_pos (ISAMB_PP pp, double *current, double *total); + +void isamb_pp_close (ISAMB_PP pp); + +int isamb_unlink (ISAMB b, ISAMC_P pos); + +ISAMB_PP isamb_pp_open_x (ISAMB isamb, ISAMB_P pos, int *level, int scope); +void isamb_pp_close_x (ISAMB_PP pp, int *size, int *blocks); + +int isamb_block_info (ISAMB isamb, int cat); + +void isamb_dump (ISAMB b, ISAMB_P pos, void (*pr)(const char *str)); + +YAZ_END_CDECL + +#endif diff --git a/include/idzebra/isamc.h b/include/idzebra/isamc.h new file mode 100644 index 0000000..6206113 --- /dev/null +++ b/include/idzebra/isamc.h @@ -0,0 +1,79 @@ +/* $Id: isamc.h,v 1.1 2004-12-08 14:02: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 ISAMC_H +#define ISAMC_H + +#include +#include + +YAZ_BEGIN_CDECL + +typedef struct ISAMC_s *ISAMC; +typedef zint ISAMC_P; +typedef struct ISAMC_PP_s *ISAMC_PP; + +typedef struct ISAMC_filecat_s { + int bsize; /* block size */ + int ifill; /* initial fill */ + int mfill; /* minimum fill */ + int mblocks; /* maximum blocks */ +} *ISAMC_filecat; + +typedef struct ISAMC_M_s { + ISAMC_filecat filecat; + + int (*compare_item)(const void *a, const void *b); + void (*log_item)(int logmask, const void *p, const char *txt); + + ISAM_CODEC codec; + + int max_blocks_mem; + int debug; +} ISAMC_M; + +typedef struct ISAMC_I_s { + int (*read_item)(void *clientData, char **dst, int *insertMode); + void *clientData; +} ISAMC_I; + +void isc_getmethod (ISAMC_M *m); + +ISAMC isc_open (BFiles bfs, const char *name, int writeflag, ISAMC_M *method); +int isc_close (ISAMC is); +ISAMC_P isc_merge (ISAMC is, ISAMC_P pos, ISAMC_I *data); + +ISAMC_PP isc_pp_open (ISAMC is, ISAMC_P pos); +void isc_pp_close (ISAMC_PP pp); +int isc_read_item (ISAMC_PP pp, char **dst); +int isc_pp_read (ISAMC_PP pp, void *buf); +zint isc_pp_num (ISAMC_PP pp); + +zint isc_block_used (ISAMC is, int type); +int isc_block_size (ISAMC is, int type); + +#define isc_type(x) ((x) & 7) +#define isc_block(x) ((x) >> 3) + +YAZ_END_CDECL + +#endif diff --git a/include/idzebra/isams.h b/include/idzebra/isams.h new file mode 100644 index 0000000..1a78006 --- /dev/null +++ b/include/idzebra/isams.h @@ -0,0 +1,66 @@ +/* $Id: isams.h,v 1.1 2004-12-08 14:02: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 ISAMS_H +#define ISAMS_H + +#include +#include +#include + +YAZ_BEGIN_CDECL + +typedef struct ISAMS_s *ISAMS; +typedef ISAMC_P ISAMS_P; +typedef struct ISAMS_PP_s *ISAMS_PP; + +typedef struct ISAMS_M_s { + int (*compare_item)(const void *a, const void *b); + void (*log_item)(int logmask, const void *p, const char *txt); + + ISAM_CODEC codec; + + int debug; + int block_size; +} ISAMS_M; + +typedef struct ISAMS_I_s { + int (*read_item)(void *clientData, char **dst, int *insertMode); + void *clientData; +} *ISAMS_I; + +void isams_getmethod (ISAMS_M *me); + +ISAMS isams_open (BFiles bfs, const char *name, int writeflag, + ISAMS_M *method); +int isams_close (ISAMS is); +ISAMS_P isams_merge (ISAMS is, ISAMS_I data); +ISAMS_PP isams_pp_open (ISAMS is, ISAMS_P pos); +void isams_pp_close (ISAMS_PP pp); +int isams_read_item (ISAMS_PP pp, char **dst); +int isams_pp_read (ISAMS_PP pp, void *buf); +int isams_pp_num (ISAMS_PP pp); + +YAZ_END_CDECL + +#endif diff --git a/include/isam-codec.h b/include/isam-codec.h deleted file mode 100644 index 117c403..0000000 --- a/include/isam-codec.h +++ /dev/null @@ -1,34 +0,0 @@ -/* $Id: isam-codec.h,v 1.2 2004-08-06 12:28:22 adam Exp $ - Copyright (C) 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 ISAM_CODEC_H -#define ISAM_CODEC_H - -typedef struct { - void *(*start)(); - void (*stop)(void *p); - void (*decode)(void *p, char **dst, const char **src); - void (*encode)(void *p, char **dst, const char **src); - void (*reset)(void *p); -} ISAM_CODEC; - -#endif diff --git a/include/isamb.h b/include/isamb.h deleted file mode 100644 index 147e8e2..0000000 --- a/include/isamb.h +++ /dev/null @@ -1,62 +0,0 @@ -/* $Id: isamb.h,v 1.16 2004-12-08 12:23:09 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 ISAMB_H -#define ISAMB_H - -#include -#include - -YAZ_BEGIN_CDECL - -typedef struct ISAMB_s *ISAMB; -typedef struct ISAMB_PP_s *ISAMB_PP; -typedef ISAMC_P ISAMB_P; - -ISAMB isamb_open (BFiles bfs, const char *name, int writeflag, ISAMC_M *method, - int cache); -void isamb_close (ISAMB isamb); - -ISAMB_P isamb_merge (ISAMB b, ISAMB_P pos, ISAMC_I *data); - -ISAMB_PP isamb_pp_open (ISAMB isamb, ISAMB_P pos, int scope); - -int isamb_pp_read (ISAMB_PP pp, void *buf); - -int isamb_pp_forward (ISAMB_PP pp, void *buf, const void *untilbuf); - -void isamb_pp_pos (ISAMB_PP pp, double *current, double *total); - -void isamb_pp_close (ISAMB_PP pp); - -int isamb_unlink (ISAMB b, ISAMC_P pos); - -ISAMB_PP isamb_pp_open_x (ISAMB isamb, ISAMB_P pos, int *level, int scope); -void isamb_pp_close_x (ISAMB_PP pp, int *size, int *blocks); - -int isamb_block_info (ISAMB isamb, int cat); - -void isamb_dump (ISAMB b, ISAMB_P pos, void (*pr)(const char *str)); - -YAZ_END_CDECL - -#endif diff --git a/include/isamc.h b/include/isamc.h deleted file mode 100644 index 61cc81a..0000000 --- a/include/isamc.h +++ /dev/null @@ -1,79 +0,0 @@ -/* $Id: isamc.h,v 1.14 2004-12-08 12:23:09 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 ISAMC_H -#define ISAMC_H - -#include -#include - -YAZ_BEGIN_CDECL - -typedef struct ISAMC_s *ISAMC; -typedef zint ISAMC_P; -typedef struct ISAMC_PP_s *ISAMC_PP; - -typedef struct ISAMC_filecat_s { - int bsize; /* block size */ - int ifill; /* initial fill */ - int mfill; /* minimum fill */ - int mblocks; /* maximum blocks */ -} *ISAMC_filecat; - -typedef struct ISAMC_M_s { - ISAMC_filecat filecat; - - int (*compare_item)(const void *a, const void *b); - void (*log_item)(int logmask, const void *p, const char *txt); - - ISAM_CODEC codec; - - int max_blocks_mem; - int debug; -} ISAMC_M; - -typedef struct ISAMC_I_s { - int (*read_item)(void *clientData, char **dst, int *insertMode); - void *clientData; -} ISAMC_I; - -void isc_getmethod (ISAMC_M *m); - -ISAMC isc_open (BFiles bfs, const char *name, int writeflag, ISAMC_M *method); -int isc_close (ISAMC is); -ISAMC_P isc_merge (ISAMC is, ISAMC_P pos, ISAMC_I *data); - -ISAMC_PP isc_pp_open (ISAMC is, ISAMC_P pos); -void isc_pp_close (ISAMC_PP pp); -int isc_read_item (ISAMC_PP pp, char **dst); -int isc_pp_read (ISAMC_PP pp, void *buf); -zint isc_pp_num (ISAMC_PP pp); - -zint isc_block_used (ISAMC is, int type); -int isc_block_size (ISAMC is, int type); - -#define isc_type(x) ((x) & 7) -#define isc_block(x) ((x) >> 3) - -YAZ_END_CDECL - -#endif diff --git a/include/isams.h b/include/isams.h deleted file mode 100644 index eac4fd5..0000000 --- a/include/isams.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $Id: isams.h,v 1.7 2004-12-08 12:23:09 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 ISAMS_H -#define ISAMS_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct ISAMS_s *ISAMS; -typedef ISAMC_P ISAMS_P; -typedef struct ISAMS_PP_s *ISAMS_PP; - -typedef struct ISAMS_M_s { - int (*compare_item)(const void *a, const void *b); - void (*log_item)(int logmask, const void *p, const char *txt); - - ISAM_CODEC codec; - - int debug; - int block_size; -} ISAMS_M; - -typedef struct ISAMS_I_s { - int (*read_item)(void *clientData, char **dst, int *insertMode); - void *clientData; -} *ISAMS_I; - -void isams_getmethod (ISAMS_M *me); - -ISAMS isams_open (BFiles bfs, const char *name, int writeflag, - ISAMS_M *method); -int isams_close (ISAMS is); -ISAMS_P isams_merge (ISAMS is, ISAMS_I data); -ISAMS_PP isams_pp_open (ISAMS is, ISAMS_P pos); -void isams_pp_close (ISAMS_PP pp); -int isams_read_item (ISAMS_PP pp, char **dst); -int isams_pp_read (ISAMS_PP pp, void *buf); -int isams_pp_num (ISAMS_PP pp); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/rset.h b/include/rset.h index f9ef08b..b364aee 100644 --- a/include/rset.h +++ b/include/rset.h @@ -1,4 +1,4 @@ -/* $Id: rset.h,v 1.42 2004-11-03 16:04:45 heikki Exp $ +/* $Id: rset.h,v 1.43 2004-12-08 14:02:36 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -29,9 +29,9 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* unfortunately we need the isam includes here, for the arguments for */ /* rsisamX_create */ -#include -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/index/index.h b/index/index.h index c87fc73..eceba4e 100644 --- a/index/index.h +++ b/index/index.h @@ -1,4 +1,4 @@ -/* $Id: index.h,v 1.127 2004-12-08 12:23:09 adam Exp $ +/* $Id: index.h,v 1.128 2004-12-08 14:02:36 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -34,9 +34,9 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -#include -#include -#include +#include +#include +#include #include #include #include "recindex.h" diff --git a/isamb/isamb.c b/isamb/isamb.c index 57ebb84..e4b87ca 100644 --- a/isamb/isamb.c +++ b/isamb/isamb.c @@ -1,4 +1,4 @@ -/* $Id: isamb.c,v 1.60 2004-11-29 21:53:00 adam Exp $ +/* $Id: isamb.c,v 1.61 2004-12-08 14:02:36 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -23,7 +23,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include -#include +#include #include #ifndef ISAMB_DEBUG diff --git a/isamb/tstisamb.c b/isamb/tstisamb.c index 5a0d3ec..1eb402c 100644 --- a/isamb/tstisamb.c +++ b/isamb/tstisamb.c @@ -1,4 +1,4 @@ -/* $Id: tstisamb.c,v 1.11 2004-11-19 10:27:09 heikki Exp $ +/* $Id: tstisamb.c,v 1.12 2004-12-08 14:02:37 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -23,7 +23,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include -#include +#include #include static void log_item(int level, const void *b, const char *txt) diff --git a/isamc/isamc-p.h b/isamc/isamc-p.h index 148096d..c3505bb 100644 --- a/isamc/isamc-p.h +++ b/isamc/isamc-p.h @@ -1,4 +1,4 @@ -/* $Id: isamc-p.h,v 1.12 2004-12-08 12:23:10 adam Exp $ +/* $Id: isamc-p.h,v 1.13 2004-12-08 14:02:37 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -23,7 +23,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include -#include +#include YAZ_BEGIN_CDECL diff --git a/isams/isams.c b/isams/isams.c index 01817b2..08d0b0f 100644 --- a/isams/isams.c +++ b/isams/isams.c @@ -1,4 +1,4 @@ -/* $Id: isams.c,v 1.8 2004-11-19 10:27:11 heikki Exp $ +/* $Id: isams.c,v 1.9 2004-12-08 14:02:37 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -27,7 +27,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -#include +#include typedef struct { int last_offset; diff --git a/rset/rsmultiandor.c b/rset/rsmultiandor.c index 2e3ea01..1d06c37 100644 --- a/rset/rsmultiandor.c +++ b/rset/rsmultiandor.c @@ -1,4 +1,4 @@ -/* $Id: rsmultiandor.c,v 1.10 2004-11-19 10:27:14 heikki Exp $ +/* $Id: rsmultiandor.c,v 1.11 2004-12-08 14:02:37 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -40,7 +40,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -#include +#include #include static RSFD r_open_and (RSET ct, int flag);