Improved installation. Moved header files to include/yaz.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 30 Nov 1999 13:47:10 +0000 (13:47 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 30 Nov 1999 13:47:10 +0000 (13:47 +0000)
189 files changed:
Makefile.in
asn/proto.c
asn/prt-acc.c
asn/prt-add.c
asn/prt-arc.c
asn/prt-dat.c
asn/prt-dia.c
asn/prt-esp.c
asn/prt-exd.c
asn/prt-exp.c
asn/prt-grs.c
asn/prt-rsc.c
asn/prt-univ.c
asn/test.c
ccl/cclerrms.c
ccl/cclfind.c
ccl/cclptree.c
ccl/cclqfile.c
ccl/cclqual.c
ccl/cclstr.c
ccl/ccltoken.c
client/Makefile.in
client/client.c
comstack/comstack.c
comstack/tcpip.c
comstack/waislen.c
configure
configure.in
include/backend.h [deleted file]
include/ccl.h [deleted file]
include/comstack.h [deleted file]
include/d1_attset.h [deleted file]
include/d1_map.h [deleted file]
include/data1.h [deleted file]
include/diagbib1.h [deleted file]
include/log.h [deleted file]
include/logrpn.h [deleted file]
include/marcdisp.h [deleted file]
include/nmem.h [deleted file]
include/odr.h [deleted file]
include/odr_use.h [deleted file]
include/oid.h [deleted file]
include/options.h [deleted file]
include/otherinfo.h [deleted file]
include/pquery.h [deleted file]
include/prt-acc.h [deleted file]
include/prt-add.h [deleted file]
include/prt-arc.h [deleted file]
include/prt-dat.h [deleted file]
include/prt-dia.h [deleted file]
include/prt-esp.h [deleted file]
include/prt-exd.h [deleted file]
include/prt-exp.h [deleted file]
include/prt-ext.h [deleted file]
include/prt-grs.h [deleted file]
include/prt-proto.h [deleted file]
include/prt-rsc.h [deleted file]
include/prt-univ.h [deleted file]
include/readconf.h [deleted file]
include/statserv.h [deleted file]
include/tcpip.h [deleted file]
include/tpath.h [deleted file]
include/wrbuf.h [deleted file]
include/xmalloc.h [deleted file]
include/xmosi.h [deleted file]
include/yaz-ccl.h [deleted file]
include/yaz-util.h [deleted file]
include/yaz-version.h [deleted file]
include/yaz/backend.h [new file with mode: 0644]
include/yaz/ccl.h [new file with mode: 0644]
include/yaz/comstack.h [new file with mode: 0644]
include/yaz/d1_attset.h [new file with mode: 0644]
include/yaz/d1_map.h [new file with mode: 0644]
include/yaz/data1.h [new file with mode: 0644]
include/yaz/diagbib1.h [new file with mode: 0644]
include/yaz/log.h [new file with mode: 0644]
include/yaz/logrpn.h [new file with mode: 0644]
include/yaz/marcdisp.h [new file with mode: 0644]
include/yaz/nmem.h [new file with mode: 0644]
include/yaz/odr.h [new file with mode: 0644]
include/yaz/odr_use.h [new file with mode: 0644]
include/yaz/oid.h [new file with mode: 0644]
include/yaz/options.h [new file with mode: 0644]
include/yaz/otherinfo.h [new file with mode: 0644]
include/yaz/pquery.h [new file with mode: 0644]
include/yaz/prt-acc.h [new file with mode: 0644]
include/yaz/prt-add.h [new file with mode: 0644]
include/yaz/prt-arc.h [new file with mode: 0644]
include/yaz/prt-dat.h [new file with mode: 0644]
include/yaz/prt-dia.h [new file with mode: 0644]
include/yaz/prt-esp.h [new file with mode: 0644]
include/yaz/prt-exd.h [new file with mode: 0644]
include/yaz/prt-exp.h [new file with mode: 0644]
include/yaz/prt-ext.h [new file with mode: 0644]
include/yaz/prt-grs.h [new file with mode: 0644]
include/yaz/prt-proto.h [new file with mode: 0644]
include/yaz/prt-rsc.h [new file with mode: 0644]
include/yaz/prt-univ.h [new file with mode: 0644]
include/yaz/readconf.h [new file with mode: 0644]
include/yaz/statserv.h [new file with mode: 0644]
include/yaz/tcpip.h [new file with mode: 0644]
include/yaz/tpath.h [new file with mode: 0644]
include/yaz/wrbuf.h [new file with mode: 0644]
include/yaz/xmalloc.h [new file with mode: 0644]
include/yaz/xmosi.h [new file with mode: 0644]
include/yaz/yaz-ccl.h [new file with mode: 0644]
include/yaz/yaz-util.h [new file with mode: 0644]
include/yaz/yaz-version.h [new file with mode: 0644]
include/yaz/yconfig.h [new file with mode: 0644]
include/yaz/z-proto.h [new file with mode: 0644]
include/yconfig.h [deleted file]
include/z-proto.h [deleted file]
odr/ber_any.c
odr/ber_bit.c
odr/ber_bool.c
odr/ber_int.c
odr/ber_len.c
odr/ber_null.c
odr/ber_oct.c
odr/ber_oid.c
odr/ber_tag.c
odr/dumpber.c
odr/odr.c
odr/odr_any.c
odr/odr_bit.c
odr/odr_bool.c
odr/odr_choice.c
odr/odr_cons.c
odr/odr_enum.c
odr/odr_int.c
odr/odr_mem.c
odr/odr_null.c
odr/odr_oct.c
odr/odr_oid.c
odr/odr_seq.c
odr/odr_tag.c
odr/odr_use.c
odr/odr_util.c
retrieval/d1_absyn.c
retrieval/d1_attset.c
retrieval/d1_doespec.c
retrieval/d1_espec.c
retrieval/d1_expout.c
retrieval/d1_grs.c
retrieval/d1_handle.c
retrieval/d1_map.c
retrieval/d1_marc.c
retrieval/d1_prtree.c
retrieval/d1_read.c
retrieval/d1_soif.c
retrieval/d1_sumout.c
retrieval/d1_sutrs.c
retrieval/d1_tagset.c
retrieval/d1_varset.c
retrieval/d1_write.c
server/eventl.c
server/requestq.c
server/seshigh.c
server/session.h
server/statserv.c
server/tcpdchk.c
tab/bib1.att
util/atoin.c
util/log.c
util/marcdisp.c
util/marcdump.c
util/matchstr.c
util/nmem.c
util/nmemsdup.c
util/oid.c
util/options.c
util/readconf.c
util/tpath.c
util/wrbuf.c
util/xmalloc.c
util/yc.tcl
win/makefile
yaz.spec [new file with mode: 0644]
z39.50/Makefile.in
ztest/Makefile.in
ztest/read-grs.c
ztest/ztest.c
zutil/diagbib1.c
zutil/logrpn.c
zutil/otherinfo.c
zutil/pquery.c
zutil/prt-ext.c
zutil/yaz-ccl.c
zutil/zget.c

index 0e03edd..83cc36f 100644 (file)
@@ -1,7 +1,7 @@
 # Copyright (C) 1995-1999, Index Data 
 # All rights reserved.
 # Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile.in,v 1.12 1999-06-09 09:43:31 adam Exp $
+# $Id: Makefile.in,v 1.13 1999-11-30 13:47:10 adam Exp $
 
 # Uncomment the lines below to enable mOSI communcation.
 #CDEFS=-DUSE_XTIMOSI
@@ -28,19 +28,25 @@ LIBS=@LIBS@
 
 RANLIB=@RANLIB@
 
+INSTALL=@INSTALL@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+INSTALL_DATA=@INSTALL_DATA@
+
 # Installation directories, etc.
 #  Binaries
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 
+BUILD=@build_root@
 BINDIR=$(exec_prefix)/bin
 #  Public libraries and header files
 LIBDIR=$(exec_prefix)/lib
 INCDIR=$(prefix)/include
 #  Misc tables, etc.
 YAZDIR=$(prefix)/lib/yaz
+YAZTAB=$(prefix)/lib/yaz/tab
 
-all:
+all: yaz-config 
        for i in $(SUBDIR); do cd $$i; if $(MAKE) CC="$(CC)" \
                RANLIB="$(RANLIB)" LIBS="$(LIBS)" \
                INCLUDE="$(INCLUDE)" CFLAGS="$(CFLAGS)" \
@@ -63,10 +69,11 @@ oclean:
        cd ztest; strip ztest
 
 cleanup:
-       rm -f `find $(SUBDIR) -name "*.[oa]" -print`
-       rm -f `find $(SUBDIR) -name "core" -print`
-       rm -f `find $(SUBDIR) -name "errlist" -print`
-       rm -f `find $(SUBDIR) -name "a.out" -print`
+       rm -f `find . -name "*.[oa]" -print`
+       rm -f `find . -name "core" -print`
+       rm -f `find . -name "errlist" -print`
+       rm -f `find . -name "a.out" -print`
+       rm -f `find . -name "yaz-config" -print`
 
 distclean: clean cleandepend
 
@@ -78,49 +85,42 @@ cleandepend:
                if sed '/^#Depend/q' <Makefile >Makefile.tmp; then \
                mv -f Makefile.tmp Makefile; fi; rm -f .depend); done
 
-install: all install.misc install.lib install.bin
-
-install.bin:
-       @if [ ! -d $(BINDIR) ]; then \
-               echo "Making directory $(BINDIR)"; \
-               mkdir $(BINDIR); \
-       fi
-       @echo "Installing client -> $(BINDIR)"; \
-       cp client/client $(BINDIR)/client; chmod 755 $(BINDIR)/client
-       @echo "Installing ztest -> $(BINDIR)"; \
-       cp ztest/ztest $(BINDIR)/ztest; chmod 755 $(BINDIR)/ztest
-
-install.lib:
-       @if [ ! -d $(LIBDIR) ]; then \
-               echo "Making directory $(LIBDIR)"; \
-               mkdir $(LIBDIR); \
-       fi
-       @echo "Installing libyaz.a -> $(LIBDIR)"; \
-       cp lib/libyaz.a $(LIBDIR)/libyaz.a; \
-       chmod 644 $(LIBDIR)/libyaz.a
+yaz-config: Makefile
+       @echo "#!/bin/sh" >yaz-config
+       @echo "# YAZ settings for developers" >>yaz-config
+       @echo "YAZBIN=\"`pwd`/bin\"" >>yaz-config
+       @echo "YAZLIB=\"`pwd`/lib\"" >>yaz-config
+       @echo "YAZTAB=\"`pwd`/tab\"" >>yaz-config
+       @echo "YAZLIB=\"-L`pwd`/lib -lyaz $(LIBS)\"" >>yaz-config
+       @echo "YAZINC=\"-I`pwd`/include\"" >>yaz-config
+
+lib/yaz-config: Makefile
+       @echo "#!/bin/sh" >lib/yaz-config
+       @echo "# YAZ settings for developers" >>lib/yaz-config
+       @echo "YAZBIN='$(BINDIR)'" >>lib/yaz-config
+       @echo "YAZLIB='$(LIBDIR)'" >>lib/yaz-config
+       @echo "YAZTAB='$(YAZTAB)'" >>lib/yaz-config
+       @echo "YAZLIB='-L$(LIBDIR) -l yaz $(LIBS)'" >>lib/yaz-config
+       @echo "YAZINC='-I$(INCDIR)'" >>lib/yaz-config
+
+install: all lib/yaz-config
+       $(INSTALL) -d $(BUILD)$(BINDIR)
+       $(INSTALL_PROGRAM) client/yaz-client $(BUILD)$(BINDIR)
+       $(INSTALL_PROGRAM) ztest/yaz-ztest $(BUILD)$(BINDIR)
+       $(INSTALL_PROGRAM) lib/yaz-config $(BUILD)$(BINDIR)
+       $(INSTALL) -d $(BUILD)$(LIBDIR)
+       $(INSTALL_DATA) lib/libyaz.a $(BUILD)$(LIBDIR)
        @if [ -f lib/librfc.a ]; then \
-               echo "Installing librfc.a -> $(LIBDIR)"; \
-               cp lib/librfc.a $(LIBDIR)/librfc.a; \
-               chmod 644 $(LIBDIR)/librfc.a; \
+               $(INSTALL_DATA) lib/librfc.a $(BUILD)$(LIBDIR); \
         fi
-       @if [ ! -d $(INCDIR) ]; then \
-               echo "Making directory $(INCDIR)"; \
-               mkdir $(INCDIR); \
-       fi
-       @cd include; for f in *.h; do \
-               echo "Installing $$f -> $(INCDIR)"; \
-               cp $$f $(INCDIR)/$$f; chmod 644 $(INCDIR)/$$f; \
+       $(INSTALL) -d $(BUILD)$(INCDIR)/yaz
+       @cd include/yaz; for f in *.h; do \
+               $(INSTALL_DATA) $$f $(BUILD)$(INCDIR)/yaz; \
        done
-
-install.misc:
-       @if [ ! -d $(YAZDIR) ]; then \
-               echo "Making directory $(YAZDIR)"; \
-               mkdir $(YAZDIR); \
-       fi
+       $(INSTALL) -d $(BUILD)$(YAZTAB)
        @cd tab; for f in *; do \
                if [ -f $$f ]; then \
-                       echo "Installing $$f -> $(YAZDIR)"; \
-                       cp $$f $(YAZDIR)/$$f; chmod 644 $(YAZDIR)/$$f; \
+                       $(INSTALL_DATA) $$f $(BUILD)$(YAZTAB); \
                fi; \
        done
 
index d82885b..0097d2b 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: proto.c,v $
- * Revision 1.60  1999-06-11 16:45:59  adam
+ * Revision 1.61  1999-11-30 13:47:10  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.60  1999/06/11 16:45:59  adam
  * Fixed minor bug in ScanRequest encoder.
  *
  * Revision 1.59  1999/04/21 11:46:00  adam
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 /* ---------------------- GLOBAL DEFS ------------------- */
 
index 5b84905..0e3817f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-acc.c,v $
- * Revision 1.8  1999-04-20 09:56:47  adam
+ * Revision 1.9  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1999/04/20 09:56:47  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -32,7 +35,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_Encryption1(ODR o, Z_Encryption1 **p, int opt, const char *name)
 {
index f0b2599..dc18e3f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-add.c,v $
- * Revision 1.5  1999-04-20 09:56:47  adam
+ * Revision 1.6  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.5  1999/04/20 09:56:47  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -23,7 +26,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_ResultsByDBList (ODR o, Z_ResultsByDBList **p, int opt, const char *name)
 {
index 2f66542..a3974c7 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-arc.c,v $
- * Revision 1.3  1999-04-20 09:56:47  adam
+ * Revision 1.4  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.3  1999/04/20 09:56:47  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -17,7 +20,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 /* ----------------------- Summary Record --------------- */
 
index 818d161..c396b99 100644 (file)
@@ -8,7 +8,10 @@
  *  Databasix Information Systems B.V., Utrecht, The Netherlands.
  *
  * $Log: prt-dat.c,v $
- * Revision 1.3  1999-04-20 09:56:47  adam
+ * Revision 1.4  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.3  1999/04/20 09:56:47  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -21,7 +24,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_MonthAndDay(ODR o, Z_MonthAndDay **p, int opt, const char *name)
 {
index f8c42a4..e8de2c9 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-dia.c,v $
- * Revision 1.6  1999-04-20 09:56:47  adam
+ * Revision 1.7  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.6  1999/04/20 09:56:47  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -26,7 +29,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_TooMany(ODR o, Z_TooMany **p, int opt, const char *name)
 {
index c6b5f28..f731a80 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-esp.c,v $
- * Revision 1.4  1999-04-20 09:56:47  adam
+ * Revision 1.5  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.4  1999/04/20 09:56:47  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -21,7 +24,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_OccurValues(ODR o, Z_OccurValues **p, int opt, const char *name)
 {
index 0c8e3b4..05de183 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-exd.c,v $
- * Revision 1.10  1999-05-26 13:49:12  adam
+ * Revision 1.11  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.10  1999/05/26 13:49:12  adam
  * DB Update implemented in client (very basic).
  *
  * Revision 1.9  1999/04/20 09:56:48  adam
@@ -39,7 +42,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_TaskPackage(ODR o, Z_TaskPackage **p, int opt, const char *name)
 {
index b7f5539..9e9243f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-exp.c,v $
- * Revision 1.12  1999-04-20 09:56:48  adam
+ * Revision 1.13  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.12  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -46,7 +49,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_LanguageCode(ODR o, char **p, int opt, const char *name);
 int z_CommonInfo(ODR o, Z_CommonInfo **p, int opt, const char *name);
index 1c4db43..9386b76 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-grs.c,v $
- * Revision 1.8  1999-04-20 09:56:48  adam
+ * Revision 1.9  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -32,7 +35,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_TaggedElement(ODR o, Z_TaggedElement **p, int opt, const char *name);
 int z_ElementData(ODR o, Z_ElementData **p, int opt, const char *name);
index 3748537..db690ee 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-rsc.c,v $
- * Revision 1.7  1999-04-20 09:56:48  adam
+ * Revision 1.8  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -29,7 +32,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 /* -------------------- Resource 1 ------------------------- */
 
index 7d18e58..b61052f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-univ.c,v $
- * Revision 1.2  1999-04-20 09:56:48  adam
+ * Revision 1.3  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -13,7 +16,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 int z_UniverseReportHits (ODR o, Z_UniverseReportHits **p, int opt,
                          const char *name)
index 280bc73..b8481af 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdio.h>
-#include <odr.h>
-#include <odr_use.h>
-#include <proto.h>
+#include <yaz/odr.h>
+#include <yaz/odr_use.h>
+#include <yaz/proto.h>
 
 int main()
 {
index d3c2968..553af28 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclerrms.c,v $
- * Revision 1.7  1998-02-11 11:53:33  adam
+ * Revision 1.8  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7  1998/02/11 11:53:33  adam
  * Changed code so that it compiles as C++.
  *
  * Revision 1.6  1997/09/29 08:56:37  adam
@@ -83,7 +86,7 @@
  */
 
 /* Chas: Required for the correct definition of ccl_err_msg */
-#include "yaz-ccl.h"
+#include <yaz/yaz-ccl.h>
 
 static char *err_msg_array[] = {
     "Ok",
index f8b19a6..4ac75a1 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclfind.c,v $
- * Revision 1.11  1999-03-31 11:15:37  adam
+ * Revision 1.12  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.11  1999/03/31 11:15:37  adam
  * Fixed memory leaks in ccl_find_str and ccl_qual_rm.
  *
  * Revision 1.10  1998/02/11 11:53:33  adam
 #include <assert.h>
 #include <string.h>
 
-#include <ccl.h>
+#include <yaz/ccl.h>
 
 /* returns type of current lookahead */
 #define KIND (cclp->look_token->kind)
index 5ed36c0..2c37bd9 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclptree.c,v $
- * Revision 1.5  1997-04-30 08:52:06  quinn
+ * Revision 1.6  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.5  1997/04/30 08:52:06  quinn
  * Null
  *
  * Revision 1.4  1996/10/11  15:00:25  adam
@@ -75,7 +78,7 @@
 #include <assert.h>
 #include <string.h>
 
-#include <ccl.h>
+#include <yaz/ccl.h>
 
 void ccl_pr_tree (struct ccl_rpn_node *rpn, FILE *fd_out)
 {
index a4ab07b..2263291 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclqfile.c,v $
- * Revision 1.2  1997-04-30 08:52:06  quinn
+ * Revision 1.3  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1997/04/30 08:52:06  quinn
  * Null
  *
  * Revision 1.1  1996/10/11  15:00:25  adam
@@ -69,7 +72,7 @@
 #include <assert.h>
 #include <string.h>
 
-#include <ccl.h>
+#include <yaz/ccl.h>
 
 void ccl_qual_fitem (CCL_bibset bibset, const char *cp, const char *qual_name)
 {
index 0196de2..9777521 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclqual.c,v $
- * Revision 1.11  1999-03-31 11:15:37  adam
+ * Revision 1.12  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.11  1999/03/31 11:15:37  adam
  * Fixed memory leaks in ccl_find_str and ccl_qual_rm.
  *
  * Revision 1.10  1998/07/07 15:49:40  adam
 #include <assert.h>
 #include <string.h>
 
-#include <ccl.h>
+#include <yaz/ccl.h>
 
 /* Definition of CCL_bibset pointer */
 struct ccl_qualifiers {
index 89f2957..f414dd6 100644 (file)
  * Europagate, 1995
  *
  * $Log: cclstr.c,v $
- * Revision 1.2  1997-04-30 08:52:07  quinn
+ * Revision 1.3  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1997/04/30 08:52:07  quinn
  * Null
  *
  * Revision 1.1  1996/10/11  15:00:26  adam
@@ -67,7 +70,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <ccl.h>
+#include <yaz/ccl.h>
 
 static int ccli_toupper (int c)
 {
index 31c272b..1521c90 100644 (file)
  * Europagate, 1995
  *
  * $Log: ccltoken.c,v $
- * Revision 1.10  1998-07-07 15:49:41  adam
+ * Revision 1.11  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.10  1998/07/07 15:49:41  adam
  * Added braces to avoid warning.
  *
  * Revision 1.9  1998/02/11 11:53:33  adam
 #include <stdlib.h>
 #include <assert.h>
 
-#include <ccl.h>
+#include <yaz/ccl.h>
 
 /*
  * token_cmp: Compare token with keyword(s)
index 8340b99..9f7bd3d 100644 (file)
@@ -1,7 +1,7 @@
 # Copyright (C) 1995-1999, Index Data
 # All rights reserved.
 # Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile.in,v 1.8 1999-06-09 09:43:31 adam Exp $
+# $Id: Makefile.in,v 1.9 1999-11-30 13:47:11 adam Exp $
 
 SHELL=/bin/sh
 
@@ -19,7 +19,7 @@ INCLUDE=-I../include -I. -I../../xtimosi/src
 DEFS=$(INCLUDE) $(CDEFS) -DCCL2RPN=1
 YAZLIBS=$(LIBDIR)/libzutil.a $(LIBDIR)/libasn.a $(LIBDIR)/libcomstack.a \
   ../lib/libccl.a $(LIBMOSI) $(LIBDIR)/libodr.a $(LIBDIR)/libutil.a 
-PROG=client
+PROG=yaz-client
 PROGO=client.o
 
 all: $(PROG)
index f04179b..4262079 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: client.c,v $
- * Revision 1.89  1999-11-04 14:58:44  adam
+ * Revision 1.90  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.89  1999/11/04 14:58:44  adam
  * Added status elements for backend delete result set handler.
  * Updated delete result result set command for client.
  *
 #include <time.h>
 #include <assert.h>
 
-#include <yaz-util.h>
+#include <yaz/yaz-util.h>
 
-#include <tcpip.h>
+#include <yaz/tcpip.h>
 #ifdef USE_XTIMOSI
-#include <xmosi.h>
+#include <yaz/xmosi.h>
 #endif
 
-#include <proto.h>
-#include <marcdisp.h>
-#include <diagbib1.h>
+#include <yaz/proto.h>
+#include <yaz/marcdisp.h>
+#include <yaz/diagbib1.h>
 
-#include <pquery.h>
+#include <yaz/pquery.h>
 
 #if CCL2RPN
-#include <yaz-ccl.h>
+#include <yaz/yaz-ccl.h>
 #endif
 
 #if HAVE_READLINE_READLINE_H
index f1892ea..8460316 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: comstack.c,v $
- * Revision 1.5  1998-06-22 11:32:35  adam
+ * Revision 1.6  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.5  1998/06/22 11:32:35  adam
  * Added 'conditional cs_listen' feature.
  *
  * Revision 1.4  1997/09/29 07:16:14  adam
@@ -28,7 +31,7 @@
  *
  */
 
-#include <comstack.h>
+#include <yaz/comstack.h>
 
 static const char *cs_errlist[] =
 {
index 6383ce3..639fd72 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: tcpip.c,v $
- * Revision 1.31  1999-04-29 07:31:23  adam
+ * Revision 1.32  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.31  1999/04/29 07:31:23  adam
  * Changed tcpip_strtoaddr_ex so that only part 'till '/' is considered
  * part of hostname.
  *
 #include <errno.h>
 #include <fcntl.h>
 
-#include <comstack.h>
-#include <tcpip.h>
-#include <log.h>
+#include <yaz/comstack.h>
+#include <yaz/tcpip.h>
+#include <yaz/log.h>
 
 /* Chas added the following, so we get the definition of completeBER */
-#include <odr.h>
+#include <yaz/odr.h>
 
 int tcpip_close(COMSTACK h);
 int tcpip_put(COMSTACK h, char *buf, int size);
index 8a91cf3..0bf2ef6 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: waislen.c,v $
- * Revision 1.4  1999-01-08 11:23:15  adam
+ * Revision 1.5  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.4  1999/01/08 11:23:15  adam
  * Added const modifier to some of the BER/ODR encoding routines.
  *
  * Revision 1.3  1996/02/29 14:23:13  adam
@@ -20,8 +23,8 @@
  */
 
 #include <stdio.h>
-#include <comstack.h>
-#include <tcpip.h>
+#include <yaz/comstack.h>
+#include <yaz/tcpip.h>
 /*
  * Return length of WAIS package or 0
  */
index a5ff5c4..75b9a52 100755 (executable)
--- a/configure
+++ b/configure
@@ -12,6 +12,8 @@ ac_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 ac_help="$ac_help
+  --with-buildroot        RPM Build root"
+ac_help="$ac_help
   --enable-yc             compile using YAZ' ASN.1 Compiler (YC)"
 ac_help="$ac_help
   --enable-tcpd           enable TCP wrapper for server if available"
@@ -457,7 +459,7 @@ echo > confdefs.h
 
 # A filename unique to this package, relative to the directory that
 # configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=include/yaz-version.h
+ac_unique_file=include/yaz/yaz-version.h
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
@@ -530,7 +532,7 @@ fi
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:534: checking for $ac_word" >&5
+echo "configure:536: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -560,7 +562,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:564: checking for $ac_word" >&5
+echo "configure:566: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -611,7 +613,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:615: checking for $ac_word" >&5
+echo "configure:617: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -643,7 +645,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:647: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -654,12 +656,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 658 "configure"
+#line 660 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -685,12 +687,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:689: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:691: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:694: checking whether we are using GNU C" >&5
+echo "configure:696: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -699,7 +701,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -718,7 +720,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:722: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:724: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -750,7 +752,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:754: checking how to run the C preprocessor" >&5
+echo "configure:756: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -765,13 +767,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 769 "configure"
+#line 771 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -782,13 +784,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 786 "configure"
+#line 788 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -799,13 +801,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 803 "configure"
+#line 805 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -860,7 +862,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:864: checking for a BSD compatible install" >&5
+echo "configure:866: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -915,7 +917,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:919: checking for $ac_word" >&5
+echo "configure:921: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -943,6 +945,15 @@ else
 fi
 
 
+# Check whether --with-build-root or --without-build-root was given.
+if test "${with_build_root+set}" = set; then
+  withval="$with_build_root"
+  build_root=$withval
+else
+  build_root=""
+fi
+
+
 # Check whether --enable-yc or --disable-yc was given.
 if test "${enable_yc+set}" = set; then
   enableval="$enable_yc"
@@ -951,19 +962,19 @@ fi
 
 if test "$enable_yc" = "yes"; then
        ASNMODULE="z39.50"
-       cp -f include/z-proto.h include/proto.h
+       cp -f include/yaz/z-proto.h include/yaz/proto.h
 else
        ASNMODULE=asn
-       cp -f include/prt-proto.h include/proto.h
+       cp -f include/yaz/prt-proto.h include/yaz/proto.h
 fi
 checkBoth=0
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:962: checking for connect" >&5
+echo "configure:973: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 967 "configure"
+#line 978 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -986,7 +997,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -1007,7 +1018,7 @@ fi
 
 if test "$ac_cv_func_connect" = "no"; then
        echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:1011: checking for main in -lsocket" >&5
+echo "configure:1022: checking for main in -lsocket" >&5
 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1015,14 +1026,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1019 "configure"
+#line 1030 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1048,12 +1059,12 @@ if test "$checkBoth" = "1"; then
        oldLibs=$LIBS
        LIBS="$LIBS -lsocket -lnsl"
        echo $ac_n "checking for accept""... $ac_c" 1>&6
-echo "configure:1052: checking for accept" >&5
+echo "configure:1063: checking for accept" >&5
 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1057 "configure"
+#line 1068 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char accept(); below.  */
@@ -1076,7 +1087,7 @@ accept();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_accept=yes"
 else
@@ -1098,12 +1109,12 @@ fi
 
 fi
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1102: checking for gethostbyname" >&5
+echo "configure:1113: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1107 "configure"
+#line 1118 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -1126,7 +1137,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -1144,7 +1155,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:1148: checking for main in -lnsl" >&5
+echo "configure:1159: checking for main in -lnsl" >&5
 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1152,14 +1163,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1156 "configure"
+#line 1167 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1182,7 +1193,7 @@ fi
 fi
 
 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:1186: checking for readline in -lreadline" >&5
+echo "configure:1197: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1190,7 +1201,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1194 "configure"
+#line 1205 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1201,7 +1212,7 @@ int main() {
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:1205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1222,7 +1233,7 @@ else
 fi
 
 echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
-echo "configure:1226: checking for add_history in -lhistory" >&5
+echo "configure:1237: checking for add_history in -lhistory" >&5
 ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1230,7 +1241,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lhistory  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1234 "configure"
+#line 1245 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1241,7 +1252,7 @@ int main() {
 add_history()
 ; return 0; }
 EOF
-if { (eval echo configure:1245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1266,17 +1277,17 @@ if test "$ac_cv_lib_readline_readline" = "yes"; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1270: checking for $ac_hdr" >&5
+echo "configure:1281: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1275 "configure"
+#line 1286 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1311,11 +1322,11 @@ fi
 
 if test "$enable_tcpd" = "yes"; then
        echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
-echo "configure:1315: checking for working tcpd.h" >&5
+echo "configure:1326: checking for working tcpd.h" >&5
        oldLibs=$LIBS
-       LIBS="$LIBS -lwrap"
+       LIBS="$LIBS -lwrap -lnsl"
        cat > conftest.$ac_ext <<EOF
-#line 1319 "configure"
+#line 1330 "configure"
 #include "confdefs.h"
 #include <syslog.h>
        #include <tcpd.h>
@@ -1326,7 +1337,7 @@ struct request_info request_info; int i;
        i = hosts_access(&request_info);
 ; return 0; }
 EOF
-if { (eval echo configure:1330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   tcpd_ok=1
 else
@@ -1348,12 +1359,12 @@ EOF
        fi
 fi
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1352: checking for ANSI C header files" >&5
+echo "configure:1363: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1357 "configure"
+#line 1368 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1361,7 +1372,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1378,7 +1389,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1382 "configure"
+#line 1393 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1396,7 +1407,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1400 "configure"
+#line 1411 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1417,7 +1428,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1421 "configure"
+#line 1432 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1428,7 +1439,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1465,17 +1476,17 @@ if test "$enable_threads" = "yes"; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1469: checking for $ac_hdr" >&5
+echo "configure:1480: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1474 "configure"
+#line 1485 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1502,12 +1513,12 @@ fi
 done
 
        echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
-echo "configure:1506: checking for pthread_mutex_lock" >&5
+echo "configure:1517: checking for pthread_mutex_lock" >&5
 if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1511 "configure"
+#line 1522 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pthread_mutex_lock(); below.  */
@@ -1530,7 +1541,7 @@ pthread_mutex_lock();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_pthread_mutex_lock=yes"
 else
@@ -1551,7 +1562,7 @@ fi
 
        if test "$ac_cv_func_pthread_mutex_lock" = "no"; then
                echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
-echo "configure:1555: checking for main in -lpthread" >&5
+echo "configure:1566: checking for main in -lpthread" >&5
 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1559,14 +1570,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1563 "configure"
+#line 1574 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1750,6 +1761,7 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@RANLIB@%$RANLIB%g
+s%@build_root@%$build_root%g
 s%@ASNMODULE@%$ASNMODULE%g
 
 CEOF
index 3551f37..57511fe 100644 (file)
@@ -1,24 +1,28 @@
 dnl YAZ Toolkit
 dnl (c) Index Data 1994-1999
 dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.11 1999-06-09 14:23:58 adam Exp $
-AC_INIT(include/yaz-version.h)
+dnl $Id: configure.in,v 1.12 1999-11-30 13:47:10 adam Exp $
+AC_INIT(include/yaz/yaz-version.h)
 dnl
 dnl ------ Checking programs
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_RANLIB
+dnl 
+dnl ----- Build root
+AC_SUBST(build_root)
+AC_ARG_WITH(build-root, [  --with-buildroot        RPM Build root],[build_root=$withval],[build_root=""])
 dnl
 dnl ----- YC: The Yaz Compiler
 AC_SUBST(ASNMODULE)
 AC_ARG_ENABLE(yc,[  --enable-yc             compile using YAZ' ASN.1 Compiler (YC)])
 if test "$enable_yc" = "yes"; then
        ASNMODULE="z39.50"
-       cp -f include/z-proto.h include/proto.h
+       cp -f include/yaz/z-proto.h include/yaz/proto.h
 else
        ASNMODULE=asn
-       cp -f include/prt-proto.h include/proto.h
+       cp -f include/yaz/prt-proto.h include/yaz/proto.h
 fi
 dnl
 dnl ----- Sockets
@@ -46,7 +50,7 @@ AC_ARG_ENABLE(tcpd,[  --enable-tcpd           enable TCP wrapper for server if a
 if test "$enable_tcpd" = "yes"; then
        AC_MSG_CHECKING(for working tcpd.h)
        oldLibs=$LIBS
-       LIBS="$LIBS -lwrap"
+       LIBS="$LIBS -lwrap -lnsl"
        AC_TRY_LINK([#include <syslog.h>
        #include <tcpd.h>
        int allow_severity = LOG_INFO;
diff --git a/include/backend.h b/include/backend.h
deleted file mode 100644 (file)
index 32f87a8..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: backend.h,v $
- * Revision 1.28  1999-11-04 14:58:44  adam
- * Added status elements for backend delete result set handler.
- * Updated delete result result set command for client.
- *
- * Revision 1.27  1999/10/11 10:01:24  adam
- * Implemented bend_sort_rr handler for frontend server.
- *
- * Revision 1.26  1999/06/17 10:54:44  adam
- * Added facility to specify implementation version - and name
- * for server.
- *
- * Revision 1.25  1999/06/01 14:29:12  adam
- * Work on Extended Services.
- *
- * Revision 1.24  1999/03/31 11:18:24  adam
- * Implemented odr_strdup. Added Reference ID to backend server API.
- *
- * Revision 1.23  1998/10/13 16:12:23  adam
- * Added support for Surrogate Diagnostics for Scan Term entries.
- *
- * Revision 1.22  1998/09/02 12:41:51  adam
- * Added decode stream in bend search structures.
- *
- * Revision 1.21  1998/07/20 12:38:41  adam
- * Implemented delete result set service to server API.
- *
- * Revision 1.20  1998/05/27 16:57:06  adam
- * Support for surrogate diagnostic records added for bend_fetch.
- *
- * Revision 1.19  1998/03/31 11:07:45  adam
- * Furhter work on UNIverse resource report.
- * Added Extended Services handling in frontend server.
- *
- * Revision 1.18  1998/02/10 11:03:56  adam
- * Added support for extended handlers in backend server interface.
- *
- * Revision 1.17  1998/01/29 13:15:35  adam
- * Implemented sort for the backend interface.
- *
- * Revision 1.16  1997/09/17 12:10:31  adam
- * YAZ version 1.4.
- *
- */
-
-#ifndef BACKEND_H
-#define BACKEND_H
-
-#include <yconfig.h>
-#include <proto.h>
-#include <statserv.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-typedef struct request *bend_request;
-typedef struct association *bend_association;
-
-/* old search request input */ 
-typedef struct 
-{
-    char *setname;             /* name to give to this set */
-    int replace_set;           /* replace set, if it already exists */
-    int num_bases;             /* number of databases in list */
-    char **basenames;          /* databases to search */
-    Z_ReferenceId *referenceId;/* reference ID */
-    Z_Query *query;            /* query structure */
-    ODR stream;                /* encoding stream */
-    ODR decode;                /* decoding stream */
-} bend_searchrequest;
-
-/* old search request output */
-typedef struct
-{
-    int hits;                  /* number of hits */
-    int errcode;               /* 0==OK */
-    char *errstring;           /* system error string or NULL */
-} bend_searchresult;
-
-/* extended search handler (rr = request response) */
-typedef struct {
-    char *setname;             /* name to give to this set */
-    int replace_set;           /* replace set, if it already exists */
-    int num_bases;             /* number of databases in list */
-    char **basenames;          /* databases to search */
-    Z_ReferenceId *referenceId;/* reference ID */
-    Z_Query *query;            /* query structure */
-    ODR stream;                /* encode stream */
-    ODR decode;                /* decode stream */
-
-    bend_request request;
-    bend_association association;
-    int *fd;
-    int hits;                  /* number of hits */
-    int errcode;               /* 0==OK */
-    char *errstring;           /* system error string or NULL */
-} bend_search_rr;
-
-/* extended present handler. Does not replace bend_fetch. */
-typedef struct {
-    char *setname;             /* set name */
-    int start;
-    int number;                /* record number */
-    oid_value format;          /* One of the CLASS_RECSYN members */
-    Z_ReferenceId *referenceId;/* reference ID */
-    Z_RecordComposition *comp; /* Formatting instructions */
-    ODR stream;                /* encoding stream - memory source if required */
-    bend_request request;
-    bend_association association;
-
-    int hits;                  /* number of hits */
-    int errcode;               /* 0==OK */
-    char *errstring;           /* system error string or NULL */
-} bend_present_rr;
-
-YAZ_EXPORT bend_searchresult *bend_search(void *handle, bend_searchrequest *r,
-                                          int *fd);
-YAZ_EXPORT int bend_searchresponse(void *handle, bend_search_rr *bsrr);
-
-typedef struct
-{
-    char *setname;             /* set name */
-    int number;                /* record number */
-    Z_ReferenceId *referenceId;/* reference ID */
-    oid_value format;          /* One of the CLASS_RECSYN members */
-    Z_RecordComposition *comp; /* Formatting instructions */
-    ODR stream;                /* encoding stream - memory source if req */
-    int surrogate_flag;        /* surrogate diagnostic flag (rw) */
-} bend_fetchrequest;
-
-typedef struct
-{
-    char *basename;            /* name of database that provided record */
-    int len;                   /* length of record or -1 if structured */
-    char *record;              /* record */
-    int last_in_set;           /* is it?  */
-    oid_value format;          /* format */
-    int errcode;               /* 0==success */
-    char *errstring;           /* system error string or NULL */
-} bend_fetchresult;
-
-YAZ_EXPORT bend_fetchresult *bend_fetch(void *handle, bend_fetchrequest *r,
-                                        int *fd);
-YAZ_EXPORT bend_fetchresult *bend_fetchresponse(void *handle);
-
-typedef struct
-{
-    int num_bases;      /* number of elements in databaselist */
-    char **basenames;   /* databases to search */
-    oid_value attributeset;
-    Z_ReferenceId *referenceId; /* reference ID */
-    Z_AttributesPlusTerm *term;
-    int term_position;  /* desired index of term in result list */
-    int num_entries;    /* number of entries requested */
-    ODR stream;         /* encoding stream - memory source if required */
-} bend_scanrequest;
-
-struct scan_entry {
-    char *term;         /* the returned scan term */
-    int occurrences;    /* no of occurrences or -1 if error (see below) */
-    int errcode;        /* Bib-1 diagnostic code; only used when occur.= -1 */
-    char *errstring;    /* Additional string */
-};
-
-typedef enum {
-    BEND_SCAN_SUCCESS,  /* ok */
-    BEND_SCAN_PARTIAL   /* not all entries could be found */
-} bend_scan_status;
-
-typedef struct bend_scanresult
-{
-    int num_entries;
-    struct scan_entry *entries;
-    int term_position;
-    bend_scan_status status;
-    int errcode;
-    char *errstring;
-} bend_scanresult;
-
-typedef struct bend_scan_rr {
-    int num_bases;      /* number of elements in databaselist */
-    char **basenames;   /* databases to search */
-    oid_value attributeset;
-    Z_ReferenceId *referenceId; /* reference ID */
-    Z_AttributesPlusTerm *term;
-    ODR stream;         /* encoding stream - memory source if required */
-
-    int term_position;  /* desired index of term in result list/returned */
-    int num_entries;    /* number of entries requested/returned */
-
-    struct scan_entry *entries;
-    bend_scan_status status;
-    int errcode;
-    char *errstring;
-} bend_scan_rr;
-
-YAZ_EXPORT bend_scanresult *bend_scan(void *handle, bend_scanrequest *r,
-                                      int *fd);
-YAZ_EXPORT bend_scanresult *bend_scanresponse(void *handle);
-
-/* delete handler */
-typedef struct bend_delete_rr {
-    int function;
-    int num_setnames;
-    char **setnames;
-    Z_ReferenceId *referenceId;
-    int delete_status;      /* status for the whole operation */
-    int *statuses;          /* status each set - indexed as setnames */
-    ODR stream;
-} bend_delete_rr;
-
-/* close handler */
-YAZ_EXPORT void bend_close(void *handle);
-
-/* sort handler */
-typedef struct bend_sort_rr
-{
-    int num_input_setnames;
-    char **input_setnames;
-    char *output_setname;
-    Z_SortKeySpecList *sort_sequence;
-    ODR stream;
-    Z_ReferenceId *referenceId;/* reference ID */
-
-    int sort_status;
-    int errcode;
-    char *errstring;
-} bend_sort_rr;
-
-/* extended services handler. Added in from DALI */
-typedef struct bend_esrequest_rr
-{
-    int ItemNo;
-    Z_ExtendedServicesRequest *esr;
-    
-    ODR stream;                /* encoding stream */
-    Z_ReferenceId *referenceId;/* reference ID */
-    bend_request request;
-    bend_association association;
-    int errcode;               /* 0==success, -1==accepted, >0 = failure */
-    char *errstring;           /* system error string or NULL */
-} bend_esrequest_rr;
-
-typedef struct bend_initrequest
-{
-    char *configname;
-    Z_IdAuthentication *auth;
-    ODR stream;                /* encoding stream */
-    Z_ReferenceId *referenceId;/* reference ID */
-    
-    char *implementation_name;
-    char *implementation_version;
-    int (*bend_sort) (void *handle, bend_sort_rr *rr);
-    int (*bend_search) (void *handle, bend_search_rr *rr);
-    int (*bend_present) (void *handle, bend_present_rr *rr);
-    int (*bend_esrequest) (void *handle, bend_esrequest_rr *rr);
-    int (*bend_delete)(void *handle, bend_delete_rr *rr);
-    int (*bend_scan)(void *handle, bend_scan_rr *rr);
-} bend_initrequest;
-
-typedef struct bend_initresult
-{
-    int errcode;               /* 0==OK */
-    char *errstring;           /* system error string or NULL */
-    void *handle;              /* private handle to the backend module */
-} bend_initresult;
-
-YAZ_EXPORT bend_initresult *bend_init(bend_initrequest *r);
-
-YAZ_EXPORT void bend_request_send (bend_association a, bend_request req,
-                                  Z_APDU *res);
-
-YAZ_EXPORT bend_request bend_request_mk (bend_association a);
-
-YAZ_EXPORT void bend_request_destroy (bend_request *req);
-
-YAZ_EXPORT Z_ReferenceId *bend_request_getid (ODR odr, bend_request req);
-YAZ_EXPORT int bend_backend_respond (bend_association a, bend_request req);
-YAZ_EXPORT void bend_request_setdata(bend_request r, void *p);
-YAZ_EXPORT void *bend_request_getdata(bend_request r);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/ccl.h b/include/ccl.h
deleted file mode 100644 (file)
index 2370ac5..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (c) 1995, the EUROPAGATE consortium (see below).
- *
- * The EUROPAGATE consortium members are:
- *
- *    University College Dublin
- *    Danmarks Teknologiske Videnscenter
- *    An Chomhairle Leabharlanna
- *    Consejo Superior de Investigaciones Cientificas
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of EUROPAGATE or the project partners may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * 3. Users of this software (implementors and gateway operators) agree to
- * inform the EUROPAGATE consortium of their use of the software. This
- * information will be used to evaluate the EUROPAGATE project and the
- * software, and to plan further developments. The consortium may use
- * the information in later publications.
- * 
- * 4. Users of this software agree to make their best efforts, when
- * documenting their use of the software, to acknowledge the EUROPAGATE
- * consortium, and the role played by the software in their work.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL THE EUROPAGATE CONSORTIUM OR ITS MEMBERS BE LIABLE
- * FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF
- * ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
- * OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND
- * ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-/*
- * CCL - header file
- *
- * $Log: ccl.h,v $
- * Revision 1.9  1998-02-11 11:53:33  adam
- * Changed code so that it compiles as C++.
- *
- * Revision 1.8  1997/09/29 09:01:19  adam
- * Changed CCL parser to be thread safe. New type, CCL-parser, declared
- * and a create/destructor ccl_parser_create/ccl_parser_destroy has been
- * added.
- *
- * Revision 1.7  1997/09/01 08:49:47  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.6  1997/05/14 06:53:37  adam
- * C++ support.
- *
- * Revision 1.5  1997/04/30 08:52:08  quinn
- * Null
- *
- * Revision 1.4  1996/10/11  15:02:26  adam
- * CCL parser from Europagate Email gateway 1.0.
- *
- * Revision 1.10  1996/01/08  08:41:22  adam
- * Minor changes.
- *
- * Revision 1.9  1995/07/20  08:15:16  adam
- * Bug fix: Token value for comma and OR were the same!
- *
- * Revision 1.8  1995/07/11  12:28:34  adam
- * New function: ccl_token_simple (split into simple tokens) and
- *  ccl_token_del (delete tokens).
- *
- * Revision 1.7  1995/05/16  09:39:38  adam
- * LICENSE.
- *
- * Revision 1.6  1995/05/11  14:04:03  adam
- * Changes in the reading of qualifier(s). New function: ccl_qual_fitem.
- * New variable ccl_case_sensitive, which controls whether reserved
- * words and field names are case sensitive or not.
- *
- * Revision 1.5  1995/02/23  08:32:11  adam
- * Changed header.
- *
- * Revision 1.3  1995/02/16  13:20:10  adam
- * Spell fix.
- *
- * Revision 1.2  1995/02/15  17:43:08  adam
- * Minor changes to the ccl interface. Bug fix in iso2709 module.
- *
- * Revision 1.1  1995/02/14  19:55:21  adam
- * Header files ccl.h/cclp.h are gone! They have been merged an
- * moved to ../include/ccl.h.
- *
- */
-
-#ifndef CCL_H
-#define CCL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-/* CCL error numbers */
-#define CCL_ERR_OK                0
-#define CCL_ERR_TERM_EXPECTED     1
-#define CCL_ERR_RP_EXPECTED       2
-#define CCL_ERR_SETNAME_EXPECTED  3
-#define CCL_ERR_OP_EXPECTED       4
-#define CCL_ERR_BAD_RP            5
-#define CCL_ERR_UNKNOWN_QUAL      6
-#define CCL_ERR_DOUBLE_QUAL       7
-#define CCL_ERR_EQ_EXPECTED       8
-#define CCL_ERR_BAD_RELATION      9
-#define CCL_ERR_TRUNC_NOT_LEFT   10
-#define CCL_ERR_TRUNC_NOT_BOTH   11
-#define CCL_ERR_TRUNC_NOT_RIGHT  12
-    
-/* attribute pair (type, value) */
-struct ccl_rpn_attr {
-    struct ccl_rpn_attr *next;
-    int type;
-    int value;
-};
-
-#define CCL_RPN_AND 1
-#define CCL_RPN_OR 2
-#define CCL_RPN_NOT 3
-#define CCL_RPN_TERM 4
-#define CCL_RPN_SET 5
-#define CCL_RPN_PROX 6
-
-/* RPN tree structure */
-struct ccl_rpn_node {
-    int kind;
-    union {
-       struct ccl_rpn_node *p[2];
-       struct {
-           char *term;
-           struct ccl_rpn_attr *attr_list;
-       } t;
-       char *setname;
-    } u;
-};
-
-typedef struct ccl_qualifiers *CCL_bibset;
-
-/* use (1)
-
-   relation (2)
-                            -1  none
-                             0  ordered
-                           1-6  relation (<, <=, =, >=, >, <>)
-
-   position (3)
-                            -1  none
-                             1  first in field
-                             2  first in sub field
-                             3  any position in field
-   structure (4)
-                            -1  none
-                             0  word/phrase auto select
-                             1  phrase
-                             2  word
-                             3  key
-                             4  year
-                             5  date (normalized)
-                             6  word list 
-                           100  date (un-normalized)
-                           101  name (normalized)
-                           102  name (un-normalized)
-   truncation (5)                            
-   completeness (6)
-*/
-
-#define CCL_BIB1_USE 1
-#define CCL_BIB1_REL 2
-#define CCL_BIB1_POS 3
-#define CCL_BIB1_STR 4
-#define CCL_BIB1_TRU 5
-#define CCL_BIB1_COM 6
-
-#define CCL_BIB1_STR_WP (-1)
-#define CCL_BIB1_REL_ORDER (-1)
-
-#define CCL_BIB1_TRU_CAN_LEFT (-1)
-#define CCL_BIB1_TRU_CAN_RIGHT (-2)
-#define CCL_BIB1_TRU_CAN_BOTH  (-3)
-#define CCL_BIB1_TRU_CAN_NONE  (-4)
-
-#define CCL_TOK_EOL   0
-#define CCL_TOK_TERM  1
-#define CCL_TOK_REL   2
-#define CCL_TOK_EQ    3
-#define CCL_TOK_PROX  4
-#define CCL_TOK_LP    5
-#define CCL_TOK_RP    6
-#define CCL_TOK_COMMA 7
-#define CCL_TOK_AND   8
-#define CCL_TOK_OR    9
-#define CCL_TOK_NOT   10
-#define CCL_TOK_MINUS 11
-#define CCL_TOK_SET   12
-
-/* CCL token */
-struct ccl_token {
-    char kind;
-    size_t len;
-    const char *name;
-    struct ccl_token *next;
-    struct ccl_token *prev;
-};
-
-/* CCL Qualifier */
-struct ccl_qualifier {
-    char *name;
-    struct ccl_rpn_attr *attr_list;
-    struct ccl_qualifier *next;
-};
-
-struct ccl_parser {
-/* current lookahead token */
-    struct ccl_token *look_token;
-    
-/* holds error code if error occur (and approx position of error) */
-    int error_code;
-    const char *error_pos;
-    
-/* current bibset */
-    CCL_bibset bibset;
-    
-    char *ccl_token_and;
-    char *ccl_token_or;
-    char *ccl_token_not;
-    char *ccl_token_set;
-    int ccl_case_sensitive;
-};
-    
-typedef struct ccl_parser *CCL_parser;
-    
-/* Generate tokens from command string - obeys all CCL opererators */
-struct ccl_token *ccl_parser_tokenize (CCL_parser cclp,
-                                      const char *command);
-struct ccl_token *ccl_tokenize (const char *command);
-    
-/* Generate tokens from command string - oebeys only simple tokens and 
-   quoted strings */
-struct ccl_token *ccl_token_simple (const char *command);
-
-/* Delete token list */
-void ccl_token_del (struct ccl_token *list);
-
-/* Parse CCL Find command - NULL-terminated string */
-struct ccl_rpn_node *ccl_find_str (CCL_bibset bibset,
-                                   const char *str, int *error, int *pos);
-
-/* Parse CCL Find command - Tokens read by ccl_tokenize */
-struct ccl_rpn_node *ccl_find (CCL_bibset abibset, struct ccl_token *list,
-                               int *error, const char **pos);
-
-/* Return english-readable error message */
-const char *ccl_err_msg (int ccl_errno);
-
-/* Delete RPN tree returned by ccl_find */
-void ccl_rpn_delete (struct ccl_rpn_node *rpn);
-
-/* Dump RPN tree in readable format to fd_out */
-void ccl_pr_tree (struct ccl_rpn_node *rpn, FILE *fd_out);
-
-/* Add CCL qualifier */
-void ccl_qual_add (CCL_bibset b, const char *name, int no, int *attr);
-
-/* Read CCL qualifier list spec from file inf */
-void ccl_qual_file (CCL_bibset bibset, FILE *inf);
-
-/* Add CCL qualifier by using single-line spec */
-void ccl_qual_fitem (CCL_bibset bibset, const char *cp, const char *qual_name);
-
-/* Make CCL qualifier set */
-CCL_bibset ccl_qual_mk (void);
-
-/* Delete CCL qualifier set */
-void ccl_qual_rm (CCL_bibset *b);
-
-/* Char-to-upper function */
-extern int (*ccl_toupper)(int c);
-
-/* String utilities */
-int ccl_stricmp (const char *s1, const char *s2);
-int ccl_memicmp (const char *s1, const char *s2, size_t n);
-
-/* Search for qualifier 'name' in set 'b'. */
-struct ccl_rpn_attr *ccl_qual_search (CCL_parser cclp, const char *name,
-                                      size_t len);
-
-/* Create CCL parser */
-CCL_parser ccl_parser_create (void);
-
-/* Destroy CCL parser */
-void ccl_parser_destroy (CCL_parser p);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/include/comstack.h b/include/comstack.h
deleted file mode 100644 (file)
index 449b8ce..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: comstack.h,v $
- * Revision 1.22  1998-06-22 11:32:37  adam
- * Added 'conditional cs_listen' feature.
- *
- * Revision 1.21  1998/05/20 09:52:39  adam
- * Removed 'dead' definition.
- *
- * Revision 1.20  1998/05/18 13:06:55  adam
- * Changed the way attribute sets are handled by the retriaval module.
- * Extended Explain conversion / schema.
- * Modified server and client to work with ASN.1 compiled protocol handlers.
- *
- * Revision 1.19  1997/09/29 07:16:14  adam
- * Array cs_errlist no longer global.
- *
- * Revision 1.18  1997/09/17 12:10:31  adam
- * YAZ version 1.4.
- *
- * Revision 1.17  1997/09/01 08:49:47  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.16  1997/05/14 06:53:37  adam
- * C++ support.
- *
- * Revision 1.15  1996/07/06 19:58:32  quinn
- * System headerfiles gathered in yconfig
- *
- * Revision 1.14  1996/02/10  12:23:41  quinn
- * Enable inetd operations fro TCP/IP stack
- *
- * Revision 1.13  1995/11/01  13:54:33  quinn
- * Minor adjustments
- *
- * Revision 1.12  1995/10/30  12:41:27  quinn
- * Added hostname lookup for server.
- *
- * Revision 1.11  1995/09/29  17:12:01  quinn
- * Smallish
- *
- * Revision 1.10  1995/09/29  17:01:48  quinn
- * More Windows work
- *
- * Revision 1.9  1995/09/28  10:12:36  quinn
- * Windows-support changes
- *
- * Revision 1.8  1995/09/27  15:02:46  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.7  1995/06/19  12:38:24  quinn
- * Reorganized include-files. Added small features.
- *
- * Revision 1.6  1995/05/30  10:54:51  quinn
- * Added some backwards compatibility to the comstack (CS_SR->PROTO_SR)
- *
- * Revision 1.5  1995/05/29  08:11:31  quinn
- * Moved oid from odr/asn to util.
- *
- * Revision 1.4  1995/05/16  08:50:29  quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.3  1995/04/20  15:12:44  quinn
- * Cosmetic
- *
- * Revision 1.2  1995/04/17  11:28:17  quinn
- * Smallish
- *
- * Revision 1.1  1995/03/30  09:39:40  quinn
- * Moved .h files to include directory
- *
- * Revision 1.11  1995/03/27  08:36:05  quinn
- * Some work on nonblocking operation in xmosi.c and rfct.c.
- * Added protocol parameter to cs_create()
- *
- * Revision 1.10  1995/03/20  09:47:12  quinn
- * Added server-side support to xmosi.c
- * Fixed possible problems in rfct
- * Other little mods
- *
- * Revision 1.9  1995/03/15  15:36:27  quinn
- * Mods to support nonblocking I/O
- *
- * Revision 1.8  1995/03/14  17:00:07  quinn
- * Bug-fixes - added tracing info to tcpip.c
- *
- * Revision 1.7  1995/03/14  10:28:35  quinn
- * Adding server-side support to tcpip.c and fixing bugs in nonblocking I/O
- *
- * Revision 1.6  1995/03/07  16:29:45  quinn
- * Various fixes.
- *
- * Revision 1.5  1995/03/07  10:39:31  quinn
- * Added cs_fileno
- *
- * Revision 1.4  1995/03/06  16:49:29  adam
- * COMSTACK type inspection possible with cs_type.
- *
- * Revision 1.3  1995/02/14  11:54:48  quinn
- * Beginning to add full CCL.
- *
- * Revision 1.2  1995/02/10  18:58:10  quinn
- * Fixed tcpip_get (formerly tcpip_read).
- * Turned tst (cli) into a proper, event-driven thing.
- *
- * Revision 1.1  1995/02/09  15:51:51  quinn
- * Works better now.
- *
- */
-
-#ifndef COMSTACK_H
-#define COMSTACK_H
-
-#define YNETINCLUDE
-#include <yconfig.h>
-#include <oid.h>
-#include <xmalloc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define COMSTACK_DEFAULT_TIMEOUT -1  /* not used yet */
-
-struct comstack;
-typedef struct comstack *COMSTACK;
-typedef COMSTACK (*CS_TYPE)(int s, int blocking, int protocol);
-
-struct comstack
-{
-    CS_TYPE type;
-    int cerrno;     /* current error code of this stack */
-    char *stackerr;/* current lower-layer error string, or null if none */
-    int iofile;    /* UNIX file descriptor for iochannel */
-    int timeout;   /* how long to wait for trailing blocks (ignored for now) */
-    void *cprivate;/* state info for lower stack */
-    int more;      /* connection has extra data in buffer */
-    int state;     /* current state */
-#define CS_UNBND      0
-#define CS_IDLE       1
-#define CS_INCON      2
-#define CS_OUTCON     3
-#define CS_DATAXFER   4
-    int newfd;     /* storing new descriptor between listen and accept */
-    int blocking;  /* is this link (supposed to be) blocking? */
-    int event;     /* current event */
-#define CS_NONE       0
-#define CS_CONNECT    1
-#define CS_DISCON     2
-#define CS_LISTEN     3
-#define CS_DATA       4
-    enum oid_proto protocol;  /* what application protocol are we talking? */
-    int (*f_put)(COMSTACK handle, char *buf, int size);
-    int (*f_get)(COMSTACK handle, char **buf, int *bufsize);
-    int (*f_more)(COMSTACK handle);
-    int (*f_connect)(COMSTACK handle, void *address);
-    int (*f_rcvconnect)(COMSTACK handle);
-    int (*f_bind)(COMSTACK handle, void *address, int mode);
-#define CS_CLIENT 0
-#define CS_SERVER 1
-    int (*f_listen)(COMSTACK h, char *raddr, int *addrlen,
-                  int (*check_ip)(void *cd, const char *a, int len, int type),
-                  void *cd);
-    COMSTACK (*f_accept)(COMSTACK handle);
-    int (*f_close)(COMSTACK handle);
-    char *(*f_addrstr)(COMSTACK handle);
-    void *(*f_straddr)(COMSTACK handle, const char *str);
-};
-
-#define cs_put(handle, buf, size) ((*(handle)->f_put)(handle, buf, size))
-#define cs_get(handle, buf, size) ((*(handle)->f_get)(handle, buf, size))
-#define cs_more(handle) ((*(handle)->f_more)(handle))
-#define cs_connect(handle, address) ((*(handle)->f_connect)(handle, address))
-#define cs_rcvconnect(handle) ((*(handle)->f_rcvconnect)(handle))
-#define cs_bind(handle, ad, mo) ((*(handle)->f_bind)(handle, ad, mo))
-#define cs_listen(handle, ap, al) ((*(handle)->f_listen)(handle, ap, al, 0, 0))
-#define cs_listen_check(handle, ap, al, cf, cd) ((*(handle)->f_listen)(handle, ap, al, cf, cd))
-#define cs_accept(handle) ((*(handle)->f_accept)(handle))
-#define cs_close(handle) ((*(handle)->f_close)(handle))
-#define cs_create(type, blocking, proto) ((*type)(-1, blocking, proto))
-#define cs_createbysocket(sock, type, blocking, proto) \
-       ((*type)(sock, blocking, proto))
-#define cs_type(handle) ((handle)->type)
-#define cs_fileno(handle) ((handle)->iofile)
-#define cs_stackerr(handle) ((handle)->stackerr)
-#define cs_getstate(handle) ((handle)->getstate)
-#define cs_errno(handle) ((handle)->cerrno)
-#define cs_getproto(handle) ((handle)->protocol)
-#define cs_addrstr(handle) ((*(handle)->f_addrstr)(handle))
-#define cs_straddr(handle, str) ((*(handle)->f_straddr)(handle, str))
-
-YAZ_EXPORT const char *cs_strerror(COMSTACK h);
-YAZ_EXPORT const char *cs_errmsg(int n);
-
-/*
- * error management.
- */
-
-#define CSNONE     0
-#define CSYSERR    1
-#define CSOUTSTATE 2
-#define CSNODATA   3
-#define CSWRONGBUF 4
-#define CSDENY     5
-
-/* backwards compatibility */
-#define CS_SR     PROTO_SR
-#define CS_Z3950  PROTO_Z3950
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/d1_attset.h b/include/d1_attset.h
deleted file mode 100644 (file)
index 82f0531..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef D1_ATTSET_H
-#define D1_ATTSET_H
-
-#include <oid.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This structure describes a attset, perhaps made up by inclusion
- * (supersetting) of other attribute sets. When indexing and searching,
- * we perform a normalisation, where we associate a given tag with
- * the set that originally defined it, rather than the superset. This
- * allows the most flexible access. Eg, the tags common to GILS and BIB-1
- * should be searchable by both names.
- */
-
-struct data1_attset;
-
-typedef struct data1_local_attribute
-{
-    int local;
-    struct data1_local_attribute *next;
-} data1_local_attribute;
-
-typedef struct data1_attset data1_attset;    
-typedef struct data1_att data1_att;
-typedef struct data1_attset_child data1_attset_child;
-
-struct data1_att
-{
-    data1_attset *parent;          /* attribute set */
-    char *name;                    /* symbolic name of this attribute */
-    int value;                     /* attribute value */
-    data1_local_attribute *locals; /* local index values */
-    data1_att *next;
-};
-
-struct data1_attset_child {
-    data1_attset *child;
-    data1_attset_child *next;
-};
-
-struct data1_attset
-{
-    char *name;          /* symbolic name */
-    oid_value reference;   /* external ID of attset */
-    data1_att *atts;          /* attributes */
-    data1_attset_child *children;  /* included attset */
-    data1_attset *next;       /* next in cache */
-};
-
-typedef struct data1_handle_info *data1_handle;
-
-YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
-                                        char *name);
-YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
-
-YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/d1_map.h b/include/d1_map.h
deleted file mode 100644 (file)
index 80f9f7b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1995,1996 Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef D1_MAP_H
-#define D1_MAP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct data1_maptag
-{
-    int new_field;
-    int type;
-#define D1_MAPTAG_numeric 1
-#define D1_MAPTAG_string 2
-    int which;
-    union
-    {
-       int numeric;
-       char *string;
-    } value;
-    struct data1_maptag *next;
-} data1_maptag;
-
-typedef struct data1_mapunit
-{
-    int no_data;
-    char *source_element_name;
-    data1_maptag *target_path;
-    struct data1_mapunit *next;
-} data1_mapunit;
-
-typedef struct data1_maptab
-{
-    char *name;
-    oid_value target_absyn_ref;
-    char *target_absyn_name;
-    data1_mapunit *map;
-    struct data1_maptab *next;
-} data1_maptab;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/data1.h b/include/data1.h
deleted file mode 100644 (file)
index 9ea9cfc..0000000
+++ /dev/null
@@ -1,565 +0,0 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: data1.h,v $
- * Revision 1.42  1999-10-21 12:06:28  adam
- * Retrieval module no longer uses ctype.h - functions.
- *
- * Revision 1.41  1999/07/13 13:23:47  adam
- * Non-recursive version of data1_read_node. data1_read_nodex reads
- * stream of bytes (instead of buffer in memory).
- *
- * Revision 1.40  1998/11/03 10:14:12  adam
- * Changed definition of data1 node so that it uses less space.
- *
- * Revision 1.39  1998/10/28 15:10:06  adam
- * Added --with-yc option to configure. For the data1_node in data1.h:
- * decreased size of localdata and removed member "line" which wasn't useful.
- *
- * Revision 1.38  1998/10/15 08:29:15  adam
- * Tag set type may be specified in reference to it using "tagset"
- * directive in .abs-files and "include" directive in .tag-files.
- *
- * Revision 1.37  1998/10/13 16:09:46  adam
- * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
- * Added support for multiple attribute set references and tagset references
- * from an abstract syntax file.
- * Fixed many bad logs-calls in routines that read the various
- * specifications regarding data1 (*.abs,*.att,...) and made the messages
- * consistent whenever possible.
- * Added extra 'lineno' argument to function readconf_line.
- *
- * Revision 1.36  1998/05/18 13:06:57  adam
- * Changed the way attribute sets are handled by the retriaval module.
- * Extended Explain conversion / schema.
- * Modified server and client to work with ASN.1 compiled protocol handlers.
- *
- * Revision 1.35  1998/03/05 08:15:32  adam
- * Implemented data1_add_insert_taggeddata utility which is more flexible
- * than data1_insert_taggeddata.
- *
- * Revision 1.34  1998/02/27 14:08:04  adam
- * Added const to some char pointer arguments.
- * Reworked data1_read_node so that it doesn't create a tree with
- * pointers to original "SGML"-buffer.
- *
- * Revision 1.33  1997/12/18 10:51:30  adam
- * Implemented sub-trees feature for schemas - including forward
- * references.
- *
- * Revision 1.32  1997/12/09 16:18:16  adam
- * Work on EXPLAIN schema. First implementation of sub-schema facility
- * in the *.abs files.
- *
- * Revision 1.31  1997/11/18 09:51:08  adam
- * Removed element num_children from data1_node. Minor changes in
- * data1 to Explain.
- *
- * Revision 1.30  1997/10/31 12:20:07  adam
- * Improved memory debugging for xmalloc/nmem.c. References to NMEM
- * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
- * Bug fix: missing fclose in data1_read_espec1.
- *
- * Revision 1.29  1997/10/27 13:54:18  adam
- * Changed structure field in data1 node to be simple string which
- * is "unknown" to the retrieval system itself.
- *
- * Revision 1.28  1997/10/06 09:37:53  adam
- * Added prototype for data1_get_map_buf.
- *
- * Revision 1.27  1997/09/24 13:35:44  adam
- * Added two members to data1_marctab to ease reading of weird MARC records.
- *
- * Revision 1.26  1997/09/17 12:10:32  adam
- * YAZ version 1.4.
- *
- * Revision 1.25  1997/09/05 09:50:55  adam
- * Removed global data1_tabpath - uses data1_get_tabpath() instead.
- *
- * Revision 1.24  1997/09/01 09:30:39  adam
- * Added include of yaz-util.h.
- *
- * Revision 1.23  1997/09/01 08:58:04  adam
- * Removed declaration of data1_matchstr since it's a macro.
- *
- * Revision 1.22  1997/09/01 08:49:48  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.21  1997/05/14 06:53:38  adam
- * C++ support.
- *
- * Revision 1.20  1996/10/29 13:34:39  adam
- * New functions to get/set data1_tabpath.
- *
- * Revision 1.19  1996/10/11 11:57:16  quinn
- * Smallish
- *
- * Revision 1.18  1996/10/07  15:29:16  quinn
- * Added SOIF support
- *
- * Revision 1.17  1996/07/06  19:58:32  quinn
- * System headerfiles gathered in yconfig
- *
- * Revision 1.16  1996/06/10  08:55:34  quinn
- * Added Summary. Unfinished work
- *
- * Revision 1.15  1996/06/03  09:46:03  quinn
- * Added OID type.
- *
- * Revision 1.14  1996/05/09  07:27:11  quinn
- * Multiple local values supported.
- *
- * Revision 1.13  1996/02/20  16:32:48  quinn
- * Created util file.
- *
- * Revision 1.12  1996/01/18  09:46:34  adam
- * Changed prototype for reader function parsed to data1_read_record.
- *
- * Revision 1.11  1995/12/15  16:19:45  quinn
- * Added formatted_text.
- *
- * Revision 1.10  1995/12/14  11:09:43  quinn
- * Work on Explain
- *
- * Revision 1.9  1995/12/13  15:32:47  quinn
- * Added sgml-output.
- *
- * Revision 1.8  1995/12/13  13:44:23  quinn
- * Modified Data1-system to use nmem
- *
- * Revision 1.7  1995/12/12  16:37:05  quinn
- * Added destroy element to data1_node.
- *
- * Revision 1.6  1995/12/11  15:22:12  quinn
- * Added last_child field to the node.
- *
- * Revision 1.5  1995/12/05  14:26:40  quinn
- * Added global lbuf to data1_node.
- *
- * Revision 1.4  1995/11/13  09:27:29  quinn
- * Fiddling with the variant stuff.
- *
- * Revision 1.3  1995/11/01  16:34:52  quinn
- * Making data1 look for tables in data1_tabpath
- *
- * Revision 1.2  1995/11/01  13:54:35  quinn
- * Minor adjustments
- *
- * Revision 1.1  1995/11/01  13:07:18  quinn
- * Data1 module now lives in YAZ.
- *
- * Revision 1.13  1995/10/25  16:00:49  quinn
- * USMARC support is now almost operational
- *
- * Revision 1.12  1995/10/16  14:02:59  quinn
- * Changes to support element set names and espec1
- *
- * Revision 1.11  1995/10/13  16:05:10  quinn
- * Adding Espec1-processing
- *
- * Revision 1.10  1995/10/11  14:53:46  quinn
- * Work on variants.
- *
- * Revision 1.9  1995/10/10  16:27:59  quinn
- * *** empty log message ***
- *
- * Revision 1.8  1995/10/06  16:44:14  quinn
- * Work on attribute set mapping, etc.
- *
- * Revision 1.7  1995/10/06  12:58:36  quinn
- * SUTRS support
- *
- * Revision 1.6  1995/10/04  09:29:51  quinn
- * Adjustments to support USGS test data
- *
- * Revision 1.5  1995/10/03  17:56:44  quinn
- * Fixing GRS code.
- *
- * Revision 1.4  1995/10/02  14:55:43  quinn
- * *** empty log message ***
- *
- * Revision 1.3  1995/09/15  14:41:43  quinn
- * GRS1 work
- *
- * Revision 1.2  1995/09/14  15:18:14  quinn
- * Work
- *
- * Revision 1.1  1995/09/12  11:24:33  quinn
- * Beginning to add code for structured records.
- *
- *
- */
-
-#ifndef DATA1_H
-#define DATA1_H
-
-#include <stdio.h>
-
-#include <nmem.h>
-#include <oid.h>
-#include <proto.h>
-
-#include <d1_attset.h>
-#include <d1_map.h>
-#include <yaz-util.h>
-#include <wrbuf.h>
-
-#define d1_isspace(c) strchr(" \r\n\t\f", c)
-#define d1_isdigit(c) ((c) <= '9' && (c) >= '0')
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define data1_matchstr(s1, s2) yaz_matchstr(s1, s2)
-
-#define DATA1_MAX_SYMBOL 31
-
-typedef struct data1_name
-{
-    char *name;
-    struct data1_name *next;
-} data1_name;
-
-typedef struct data1_absyn_cache_info *data1_absyn_cache;
-typedef struct data1_attset_cache_info *data1_attset_cache;
-
-typedef enum data1_datatype
-{
-    DATA1K_unknown,
-    DATA1K_structured,
-    DATA1K_string,
-    DATA1K_numeric,
-    DATA1K_bool,
-    DATA1K_oid,
-    DATA1K_generalizedtime,
-    DATA1K_intunit,
-    DATA1K_int,
-    DATA1K_octetstring,
-    DATA1K_null
-} data1_datatype;
-
-typedef struct data1_marctab
-{
-    char *name;
-    oid_value reference;
-
-    char record_status[2];
-    char implementation_codes[5];
-    int  indicator_length;
-    int  identifier_length;
-    char user_systems[4];
-
-    int  length_data_entry;
-    int  length_starting;
-    int  length_implementation;
-    char future_use[2];
-
-    int  force_indicator_length;
-    int  force_identifier_length;
-    struct data1_marctab *next;
-} data1_marctab;
-
-typedef struct data1_esetname
-{
-    char *name;
-    Z_Espec1 *spec;
-    struct data1_esetname *next;
-} data1_esetname;
-
-/*
- * Variant set definitions.
- */
-
-typedef struct data1_vartype
-{
-    char *name;
-    struct data1_varclass *zclass;
-    int type;
-    data1_datatype datatype;
-    struct data1_vartype *next;
-} data1_vartype;
-
-typedef struct data1_varclass
-{
-    char *name;
-    struct data1_varset *set;
-    int zclass;
-    data1_vartype *types;
-    struct data1_varclass *next;
-} data1_varclass;
-
-typedef struct data1_varset
-{
-    char *name;
-    oid_value reference;
-    data1_varclass *classes;
-} data1_varset;
-
-/*
- * Tagset definitions
- */
-
-struct data1_tagset;
-
-typedef struct data1_tag
-{
-    data1_name *names;
-#define DATA1T_numeric 1
-#define DATA1T_string 2
-    int which;
-    union
-    {
-       int numeric;
-       char *string;
-    } value;
-    data1_datatype kind;
-
-    struct data1_tagset *tagset;
-    struct data1_tag *next;
-} data1_tag;
-
-typedef struct data1_tagset data1_tagset;
-
-struct data1_tagset
-{
-    int type;                        /* type of tagset in current context */
-    char *name;                      /* symbolic name */
-    oid_value reference;
-    data1_tag *tags;                 /* tags defined by this set */
-    data1_tagset *children;          /* children */
-    data1_tagset *next;              /* sibling */
-};
-
-typedef struct data1_termlist
-{
-    data1_att *att;
-    char *structure;
-    struct data1_termlist *next;
-} data1_termlist;
-
-/*
- * abstract syntax specification
- */
-
-typedef struct data1_element
-{
-    char *name;
-    data1_tag *tag;
-    data1_termlist *termlists;
-    char *sub_name;
-    struct data1_element *children;
-    struct data1_element *next;
-} data1_element;
-
-typedef struct data1_sub_elements {
-    char *name;
-    struct data1_sub_elements *next;
-    data1_element *elements;
-} data1_sub_elements;
-
-typedef struct data1_absyn
-{
-    char *name;
-    oid_value reference;
-    data1_tagset *tagset;
-    data1_attset *attset;
-    data1_varset *varset;
-    data1_esetname *esetnames;
-    data1_maptab *maptabs;
-    data1_marctab *marc;
-    data1_sub_elements *sub_elements;
-    data1_element *main_elements;
-} data1_absyn;
-
-/*
- * record data node (tag/data/variant)
- */
-
-typedef struct data1_node
-{
-    /* the root of a record (containing global data) */
-#define DATA1N_root 1 
-    /* a tag */
-#define DATA1N_tag  2       
-    /* some data under a leaf tag or variant */
-#define DATA1N_data 3
-    /* variant specification (a triple, actually) */
-#define DATA1N_variant 4
-    int which;
-
-    union
-    {
-       struct
-       {
-           char *type;
-           data1_absyn *absyn;  /* abstract syntax for this type */
-       } root;
-
-       struct 
-       {
-           char *tag;
-           data1_element *element;
-           int no_data_requested;
-           int get_bytes;
-           unsigned node_selected : 1;
-           unsigned make_variantlist : 1;
-       } tag;
-
-       struct
-       {
-           char *data;      /* filename or data */
-           int len;
-        /* text inclusion */
-#define DATA1I_inctxt 1
-        /* binary data inclusion */
-#define DATA1I_incbin 2
-        /* text data */
-#define DATA1I_text 3 
-        /* numerical data */
-#define DATA1I_num 4
-        /* object identifier */
-#define DATA1I_oid 5         
-            unsigned what:7;
-           unsigned formatted_text : 1;   /* newlines are significant */
-       } data;
-
-       struct
-       {
-           data1_vartype *type;
-           char *value;
-       } variant;
-    } u;
-
-    void (*destroy)(struct data1_node *n);
-#define DATA1_LOCALDATA 12
-    char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */
-    struct data1_node *next;
-    struct data1_node *child;
-    struct data1_node *last_child;
-    struct data1_node *parent;
-    struct data1_node *root;
-} data1_node;
-
-YAZ_EXPORT data1_handle data1_create (void);
-YAZ_EXPORT void data1_destroy(data1_handle dh);
-YAZ_EXPORT data1_node *get_parent_tag(data1_handle dh, data1_node *n);
-YAZ_EXPORT data1_node *data1_read_node(data1_handle dh, const char **buf,
-                                      NMEM m);
-YAZ_EXPORT data1_node *data1_read_nodex (data1_handle dh, NMEM m,
-                                        int (*get_byte)(void *fh), void *fh,
-                                        WRBUF wrbuf);
-YAZ_EXPORT data1_node *data1_read_record(data1_handle dh, 
-                                        int (*rf)(void *, char *, size_t),
-                                        void *fh, NMEM m);
-YAZ_EXPORT data1_absyn *data1_read_absyn(data1_handle dh, const char *file);
-YAZ_EXPORT data1_tag *data1_gettagbynum(data1_handle dh,
-                                       data1_tagset *s,
-                                       int type, int value);
-YAZ_EXPORT data1_tagset *data1_empty_tagset (data1_handle dh);
-YAZ_EXPORT data1_tagset *data1_read_tagset(data1_handle dh, 
-                                          const char *file,
-                                          int type);
-YAZ_EXPORT data1_element *data1_getelementbytagname(data1_handle dh, 
-                                                   data1_absyn *abs,
-                                                   data1_element *parent,
-                                                   const char *tagname);
-YAZ_EXPORT Z_GenericRecord *data1_nodetogr(data1_handle dh, data1_node *n,
-                                          int select, ODR o,
-                                          int *len);
-YAZ_EXPORT data1_tag *data1_gettagbyname(data1_handle dh, data1_tagset *s,
-                                        const char *name);
-YAZ_EXPORT void data1_free_tree(data1_handle dh, data1_node *t);
-YAZ_EXPORT char *data1_nodetobuf(data1_handle dh, data1_node *n,
-                                int select, int *len);
-YAZ_EXPORT data1_node *data1_insert_taggeddata(data1_handle dh,
-                                              data1_node *root,
-                                              data1_node *at,
-                                              const char *tagname, NMEM m);
-YAZ_EXPORT data1_node *data1_add_taggeddata(data1_handle dh, data1_node *root,
-                                           data1_node *at,
-                                           const char *tagname, NMEM m);
-YAZ_EXPORT data1_datatype data1_maptype(data1_handle dh, char *t);
-YAZ_EXPORT data1_varset *data1_read_varset(data1_handle dh, const char *file);
-YAZ_EXPORT data1_vartype *data1_getvartypebyct(data1_handle dh,
-                                              data1_varset *set,
-                                              char *zclass, char *type);
-YAZ_EXPORT Z_Espec1 *data1_read_espec1(data1_handle dh, const char *file);
-YAZ_EXPORT int data1_doespec1(data1_handle dh, data1_node *n, Z_Espec1 *e);
-YAZ_EXPORT data1_esetname *data1_getesetbyname(data1_handle dh, 
-                                              data1_absyn *a,
-                                              const char *name);
-YAZ_EXPORT data1_element *data1_getelementbyname(data1_handle dh,
-                                                data1_absyn *absyn,
-                                                const char *name);
-YAZ_EXPORT data1_node *data1_mk_node(data1_handle dh, NMEM m);
-YAZ_EXPORT data1_absyn *data1_get_absyn(data1_handle dh, const char *name);
-YAZ_EXPORT data1_attset *data1_get_attset (data1_handle dh, const char *name);
-YAZ_EXPORT data1_maptab *data1_read_maptab(data1_handle dh, const char *file);
-YAZ_EXPORT data1_node *data1_map_record(data1_handle dh, data1_node *n,
-                                       data1_maptab *map, NMEM m);
-YAZ_EXPORT data1_marctab *data1_read_marctab (data1_handle dh,
-                                             const char *file);
-YAZ_EXPORT char *data1_nodetomarc(data1_handle dh, data1_marctab *p,
-                                 data1_node *n, int selected, int *len);
-YAZ_EXPORT char *data1_nodetoidsgml(data1_handle dh, data1_node *n,
-                                   int select, int *len);
-YAZ_EXPORT Z_ExplainRecord *data1_nodetoexplain(data1_handle dh,
-                                               data1_node *n, int select,
-                                               ODR o);
-YAZ_EXPORT Z_BriefBib *data1_nodetosummary(data1_handle dh, 
-                                          data1_node *n, int select,
-                                          ODR o);
-YAZ_EXPORT char *data1_nodetosoif(data1_handle dh, data1_node *n, int select,
-                                 int *len);
-YAZ_EXPORT void data1_set_tabpath(data1_handle dh, const char *path);
-YAZ_EXPORT const char *data1_get_tabpath(data1_handle dh);
-
-YAZ_EXPORT WRBUF data1_get_wrbuf (data1_handle dp);
-YAZ_EXPORT char **data1_get_read_buf (data1_handle dp, int **lenp);
-YAZ_EXPORT char **data1_get_map_buf (data1_handle dp, int **lenp);
-YAZ_EXPORT data1_absyn_cache *data1_absyn_cache_get (data1_handle dh);
-YAZ_EXPORT data1_attset_cache *data1_attset_cache_get (data1_handle dh);
-YAZ_EXPORT NMEM data1_nmem_get (data1_handle dh);
-YAZ_EXPORT void data1_pr_tree (data1_handle dh, data1_node *n, FILE *out);
-YAZ_EXPORT char *data1_insert_string (data1_handle dh, data1_node *res,
-                                     NMEM m, const char *str);
-YAZ_EXPORT data1_node *data1_read_sgml (data1_handle dh, NMEM m,
-                                       const char *buf);
-YAZ_EXPORT void data1_absyn_trav (data1_handle dh, void *handle,
-                                 void (*fh)(data1_handle dh,
-                                            void *h, data1_absyn *a));
-
-YAZ_EXPORT data1_attset *data1_attset_search_id (data1_handle dh, int id);
-
-YAZ_EXPORT data1_node 
-*data1_add_insert_taggeddata(data1_handle dh, data1_node *root,
-                             data1_node *at, const char *tagname, NMEM m,
-                             int first_flag, int local_allowed);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/diagbib1.h b/include/diagbib1.h
deleted file mode 100644 (file)
index b2d5fe0..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: diagbib1.h,v $
- * Revision 1.6  1997-09-01 08:49:48  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.5  1997/05/14 06:53:39  adam
- * C++ support.
- *
- * Revision 1.4  1995/09/29 17:12:02  quinn
- * Smallish
- *
- * Revision 1.3  1995/09/27  15:02:47  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.2  1995/05/16  08:50:30  quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.1  1995/03/30  09:39:40  quinn
- * Moved .h files to include directory
- *
- * Revision 1.1  1995/03/15  13:46:09  adam
- * New function diagbib1_str.
- *
- */
-
-#ifndef DIAGBIB1_H
-#define DIAGBIB1_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT const char *diagbib1_str (int code);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/log.h b/include/log.h
deleted file mode 100644 (file)
index f562dfa..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: log.h,v $
- * Revision 1.15  1999-08-27 09:40:32  adam
- * Renamed logf function to yaz_log. Removed VC++ project files.
- *
- * Revision 1.14  1998/10/28 10:26:59  adam
- * New functions log_init_file, log_init_level, log_init_prefix.
- *
- * Revision 1.13  1998/10/13 16:11:11  adam
- * Added printf-format check for logf when using GNUC.
- *
- * Revision 1.12  1997/09/04 07:59:02  adam
- * Added include of xmalloc.h.
- *
- * Revision 1.11  1997/09/01 08:49:48  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.10  1997/05/14 06:53:40  adam
- * C++ support.
- *
- * Revision 1.9  1997/05/01 15:06:42  adam
- * Added log_mask_str_x routine.
- *
- * Revision 1.8  1996/05/01 12:45:00  quinn
- * *** empty log message ***
- *
- * Revision 1.7  1996/02/05  12:24:26  adam
- * Implemented log_event_{start,end}-functions.
- *
- * Revision 1.6  1995/10/10  16:27:06  quinn
- * *** empty log message ***
- *
- * Revision 1.5  1995/09/29  17:12:03  quinn
- * Smallish
- *
- * Revision 1.4  1995/09/27  15:02:47  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.3  1995/06/19  12:38:25  quinn
- * Reorganized include-files. Added small features.
- *
- * Revision 1.2  1995/05/16  08:50:31  quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.1  1995/03/30  09:39:41  quinn
- * Moved .h files to include directory
- *
- * Revision 1.4  1994/09/28  13:07:22  adam
- * Added log_mask_str.
- *
- * Revision 1.3  1994/08/18  08:18:45  quinn
- * Added prefix to log_init.
- *
- * Revision 1.2  1994/08/17  14:27:46  quinn
- * added LOG_ERRNO
- *
- * Revision 1.1  1994/08/17  13:22:52  quinn
- * First version
- *
- */
-
-#ifndef LOG_H
-#define LOG_H
-
-#include <yconfig.h>
-#include <xmalloc.h>
-#include <stdio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LOG_FATAL 0x0001
-#define LOG_DEBUG 0x0002
-#define LOG_WARN  0x0004
-#define LOG_LOG   0x0008
-#define LOG_ERRNO 0x0010     /* append strerror to message */
-#define LOG_FILE  0x0020
-
-#define LOG_ALL   0xffff
-
-#define LOG_DEFAULT_LEVEL (LOG_FATAL | LOG_ERRNO | LOG_LOG | LOG_WARN)
-
-#define logf yaz_log
-
-YAZ_EXPORT void log_init(int level, const char *prefix, const char *name);
-YAZ_EXPORT void log_init_file (const char *fname);
-YAZ_EXPORT void log_init_level (int level);
-YAZ_EXPORT void log_init_prefix (const char *prefix);
-
-YAZ_EXPORT void yaz_log(int level, const char *fmt, ...)
-#ifdef __GNUC__
-       __attribute__ ((format (printf, 2, 3)))
-#endif
-       ;
-YAZ_EXPORT int log_mask_str (const char *str);
-YAZ_EXPORT int log_mask_str_x (const char *str, int level);
-YAZ_EXPORT FILE *log_file(void);
-
-YAZ_EXPORT void log_event_start (void (*func)(int level, const char *msg, void *info),
-       void *info);
-YAZ_EXPORT void log_event_end (void (*func)(int level, const char *msg, void *info),
-       void *info);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/logrpn.h b/include/logrpn.h
deleted file mode 100644 (file)
index a77985c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1997-1998, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: logrpn.h,v $
- * Revision 1.1  1998-11-16 16:02:32  adam
- * Added loggin utilies, log_rpn_query and log_scan_term. These used
- * to be part of Zebra.
- *
- */
-
-#ifndef LOG_RPN_H
-#define LOG_RPN_H
-
-#include <yconfig.h>
-#include <proto.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT void log_rpn_query (Z_RPNQuery *rpn);
-YAZ_EXPORT void log_scan_term (Z_AttributesPlusTerm *zapt, oid_value ast);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/marcdisp.h b/include/marcdisp.h
deleted file mode 100644 (file)
index db7197e..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: marcdisp.h,v $
- * Revision 1.8  1997-09-24 13:35:45  adam
- * Added two members to data1_marctab to ease reading of weird MARC records.
- *
- * Revision 1.7  1997/09/04 07:57:51  adam
- * Definition of ISO2709 control characters to this file.
- *
- * Revision 1.6  1997/09/01 08:49:49  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.5  1997/05/14 06:53:40  adam
- * C++ support.
- *
- * Revision 1.4  1995/09/29 17:12:03  quinn
- * Smallish
- *
- * Revision 1.3  1995/09/27  15:02:47  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.2  1995/05/16  08:50:32  quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.1  1995/04/10  10:28:28  quinn
- * Added copy of CCL.
- *
- */
-
-#ifndef MARCDISP_H
-#define MARCDISP_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT int marc_display (const char *buf, FILE *outf);
-YAZ_EXPORT int marc_display_ex (const char *buf, FILE *outf, int debug);
-
-#define ISO2709_RS 035
-#define ISO2709_FS 036
-#define ISO2709_IDFS 037
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/nmem.h b/include/nmem.h
deleted file mode 100644 (file)
index 1b7327f..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: nmem.h,v $
- * Revision 1.10  1998-10-19 15:24:20  adam
- * New nmem utility, nmem_transfer, that transfer blocks from one
- * NMEM to another.
- *
- * Revision 1.9  1998/10/13 16:00:17  adam
- * Implemented nmem_critical_{enter,leave}.
- *
- * Revision 1.8  1998/07/20 12:35:59  adam
- * Added more memory diagnostics (when NMEM_DEBUG is 1).
- *
- * Revision 1.7  1997/10/31 12:20:08  adam
- * Improved memory debugging for xmalloc/nmem.c. References to NMEM
- * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
- * Bug fix: missing fclose in data1_read_espec1.
- *
- */
-
-#ifndef NMEM_H
-#define NMEM_H
-#include <yconfig.h>
-
-#define NMEM_DEBUG 0
-
-#ifndef NMEM_DEBUG
-#define NMEM_DEBUG 0
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct nmem_block
-{
-    char *buf;              /* memory allocated in this block */
-    int size;               /* size of buf */
-    int top;                /* top of buffer */
-    struct nmem_block *next;
-} nmem_block;
-
-typedef struct nmem_control
-{
-    int total;
-    nmem_block *blocks;
-    struct nmem_control *next;
-} nmem_control;
-
-typedef struct nmem_control *NMEM;
-
-YAZ_EXPORT void nmem_reset(NMEM n);
-YAZ_EXPORT int nmem_total(NMEM n);
-YAZ_EXPORT char *nmem_strdup (NMEM mem, const char *src);
-YAZ_EXPORT void nmem_transfer (NMEM dst, NMEM src);
-
-YAZ_EXPORT void nmem_critical_enter (void);
-YAZ_EXPORT void nmem_critical_leave (void);
-
-#if NMEM_DEBUG
-
-YAZ_EXPORT NMEM nmem_create_f(const char *file, int line);
-YAZ_EXPORT void nmem_destroy_f(const char *file, int line, NMEM n);
-YAZ_EXPORT void *nmem_malloc_f(const char *file, int line, NMEM n, int size);
-#define nmem_create() nmem_create_f(__FILE__, __LINE__)
-#define nmem_destroy(x) nmem_destroy_f(__FILE__, __LINE__, (x))
-#define nmem_malloc(x, y) nmem_malloc_f(__FILE__, __LINE__, (x), (y))
-
-#else
-
-YAZ_EXPORT NMEM nmem_create(void);
-YAZ_EXPORT void nmem_destroy(NMEM n);
-YAZ_EXPORT void *nmem_malloc(NMEM n, int size);
-
-#endif
-
-YAZ_EXPORT void nmem_init (void);
-YAZ_EXPORT void nmem_exit (void);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/odr.h b/include/odr.h
deleted file mode 100644 (file)
index c4eecd9..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Id: odr.h,v 1.29 1999-04-20 09:56:48 adam Exp $
- */
-
-#ifndef ODR_H
-#define ODR_H
-
-#include <stdio.h>
-#include <string.h>
-
-#include <nmem.h>
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef bool_t
-#define bool_t int
-#endif
-
-/*
- * Tag modes
- */
-#define ODR_NONE -1
-#define ODR_IMPLICIT 0
-#define ODR_EXPLICIT 1
-
-/*
- * Classes
- */
-#define ODR_UNIVERSAL   0
-#define ODR_APPLICATION 1
-#define ODR_CONTEXT     2
-#define ODR_PRIVATE     3
-
-/*
- * UNIVERSAL tags
- */
-#define ODR_BOOLEAN     1
-#define ODR_INTEGER     2
-#define ODR_BITSTRING   3
-#define ODR_OCTETSTRING 4
-#define ODR_NULL        5
-#define ODR_OID         6
-#define ODR_ODESC       7
-#define ODR_EXTERNAL    8
-#define ODR_REAL        9
-#define ODR_ENUM        10
-#define ODR_SEQUENCE    16
-#define ODR_SET         17
-#define ODR_NUMERICSTRING   18
-#define ODR_PRINTABLESTRING 19
-#define ODR_GENERALIZEDTIME 24
-#define ODR_GRAPHICSTRING   25
-#define ODR_VISIBLESTRING   26
-#define ODR_GENERALSTRING   27
-
-/*
- * odr stream directions
- */
-#define ODR_DECODE      0
-#define ODR_ENCODE      1
-#define ODR_PRINT       2
-
-typedef struct odr_oct
-{
-    unsigned char *buf;
-    int len;
-    int size;
-} Odr_oct;
-
-typedef void Odr_null;
-extern Odr_null *ODR_NULLVAL;
-
-typedef Odr_oct Odr_any;
-
-typedef struct odr_bitmask
-{
-#define ODR_BITMASK_SIZE 256
-    unsigned char bits[ODR_BITMASK_SIZE];
-    int top;
-} Odr_bitmask;
-
-typedef int Odr_oid;   /* terminate by -1 */
-
-typedef struct odr_constack
-{
-    const unsigned char *base;   /* starting point of data */
-    int base_offset;
-    int len;                     /* length of data, if known, else -1
-                                        (decoding only) */
-    const unsigned char *lenb;   /* where to encode length */
-    int len_offset;
-    int lenlen;                  /* length of length-field */
-} odr_constack;
-
-#define ODR_S_SET     0
-#define ODR_S_CUR     1
-#define ODR_S_END     2
-
-typedef struct odr_ecblock
-{
-    int can_grow;         /* are we allowed to reallocate */
-    unsigned char *buf;            /* memory handle */
-    int pos;              /* current position */
-    int top;              /* top of buffer */
-    int size;             /* current buffer size */
-} odr_ecblock;
-
-typedef struct {      /* used to be statics in ber_tag... */
-    int lclass;
-    int ltag;
-    int br;
-    int lcons;
-} Odr_ber_tag;
-
-typedef struct odr
-{
-    int direction;       /* the direction of this stream */
-
-    int error;           /* current error state (0==OK) */
-    const unsigned char *buf;  /* for encoding or decoding */
-    int buflen;          /* size of buffer for encoding, len for decoding */
-    const unsigned char *bp;   /* position in buffer */
-    int left;            /* bytes remaining in buffer */
-
-    odr_ecblock ecb;     /* memory control block */
-
-    int t_class;         /* implicit tagging (-1==default tag) */
-    int t_tag;
-
-    int enable_bias;     /* force choice enable flag */
-    int choice_bias;     /* force choice */
-    int lenlen;          /* force length-of-lenght (odr_setlen()) */
-
-    FILE *print;         /* output file for direction print */
-    int indent;          /* current indent level for printing */
-
-    NMEM mem;            /* memory handle for decoding (primarily) */
-
-    /* stack for constructed types */
-#define ODR_MAX_STACK 50
-    int stackp;          /* top of stack (-1 == initial state) */
-    odr_constack stack[ODR_MAX_STACK];
-
-    Odr_ber_tag odr_ber_tag;
-} *ODR;
-
-typedef int (*Odr_fun)(ODR, char **, int, const char *);
-
-typedef struct odr_arm
-{
-    int tagmode;
-    int zclass;
-    int tag;
-    int which;
-    Odr_fun fun;
-    char *name;
-} Odr_arm;
-
-/*
- * Error control.
- */
-#define ONONE           0
-#define OMEMORY         1
-#define OSYSERR         2
-#define OSPACE          3
-#define OREQUIRED       4
-#define OUNEXPECTED     5
-#define OOTHER          6
-#define OPROTO          7
-#define ODATA           8
-#define OSTACK          9
-#define OCONLEN        10
-#define OLENOV         11
-
-extern char *odr_errlist[];
-
-YAZ_EXPORT int odr_geterror(ODR o);
-YAZ_EXPORT void odr_perror(ODR o, char *message);
-YAZ_EXPORT void odr_setprint(ODR o, FILE *file);
-YAZ_EXPORT ODR odr_createmem(int direction);
-YAZ_EXPORT void odr_reset(ODR o);
-YAZ_EXPORT void odr_destroy(ODR o);
-YAZ_EXPORT void odr_setbuf(ODR o, char *buf, int len, int can_grow);
-YAZ_EXPORT char *odr_getbuf(ODR o, int *len, int *size);
-YAZ_EXPORT void *odr_malloc(ODR o, int size);
-YAZ_EXPORT char *odr_strdup(ODR o, const char *str);
-YAZ_EXPORT NMEM odr_extract_mem(ODR o);
-YAZ_EXPORT Odr_null *odr_nullval(void);
-#define odr_release_mem(m) nmem_destroy(m)
-#define ODR_MEM NMEM
-
-#define odr_implicit(o, t, p, cl, tg, opt)\
-        (odr_implicit_settag((o), cl, tg), t ((o), (p), (opt), 0) )
-
-#define odr_implicit_tag(o, t, p, cl, tg, opt, name)\
-        (odr_implicit_settag((o), cl, tg), t ((o), (p), (opt), name) )
-
-#define odr_explicit(o, t, p, cl, tg, opt)\
-        ((int) (odr_constructed_begin((o), (p), (cl), (tg), 0) ? \
-        t ((o), (p), (opt), 0) &&\
-        odr_constructed_end(o) : opt))
-
-#define odr_explicit_tag(o, t, p, cl, tg, opt, name)\
-        ((int) (odr_constructed_begin((o), (p), (cl), (tg), 0) ? \
-        t ((o), (p), (opt), name) &&\
-        odr_constructed_end(o) : opt))
-
-#define ODR_MASK_ZERO(mask)\
-    ((void) (memset((mask)->bits, 0, ODR_BITMASK_SIZE),\
-    (mask)->top = -1))
-
-#define ODR_MASK_SET(mask, num)\
-    (((mask)->bits[(num) >> 3] |= 0X80 >> ((num) & 0X07)),\
-    (mask)->top < (num) >> 3 ? ((mask)->top = (num) >> 3) : 0)
-
-#define ODR_MASK_CLEAR(mask, num)\
-    ((mask)->bits[(num) >> 3] &= ~(0X80 >> ((num) & 0X07)))
-
-#define ODR_MASK_GET(mask, num)  ( ((num) >> 3 <= (mask)->top) ? \
-    ((mask)->bits[(num) >> 3] & (0X80 >> ((num) & 0X07)) ? 1 : 0) : 0)
-
-/* Private macro.
- * write a single character at the current position - grow buffer if
- * necessary.
- * (no, we're not usually this anal about our macros, but this baby is
- *  next to unreadable without some indentation  :)
- */
-#define odr_putc(o, c) \
-( \
-    ( \
-        (o)->ecb.pos < (o)->ecb.size ? \
-        ( \
-            (o)->ecb.buf[(o)->ecb.pos++] = (c), \
-            0 \
-        ) : \
-        ( \
-            odr_grow_block(&(o)->ecb, 1) == 0 ? \
-            ( \
-                (o)->ecb.buf[(o)->ecb.pos++] = (c), \
-                0 \
-            ) : \
-            ( \
-                (o)->error = OSPACE, \
-                -1 \
-            ) \
-        ) \
-    ) == 0 ? \
-    ( \
-        (o)->ecb.pos > (o)->ecb.top ? \
-        ( \
-            (o)->ecb.top = (o)->ecb.pos, \
-            0 \
-        ) : \
-        0 \
-    ) : \
-        -1 \
-) \
-
-#define odr_tell(o) ((o)->ecb.pos)
-#define odr_offset(o) ((o)->bp - (o)->buf)
-#define odr_ok(o) (!(o)->error)
-#define odr_getmem(o) ((o)->mem)
-#define odr_setmem(o, v) ((o)->mem = (v))
-
-#define ODR_MAXNAME 256
-
-YAZ_EXPORT int ber_boolean(ODR o, int *val);
-YAZ_EXPORT int ber_tag(ODR o, void *p, int zclass, int tag,
-                      int *constructed, int opt);
-YAZ_EXPORT int ber_enctag(ODR o, int zclass, int tag, int constructed);
-YAZ_EXPORT int ber_dectag(const unsigned char *buf, int *zclass,
-                         int *tag, int *constructed);
-YAZ_EXPORT int odr_bool(ODR o, int **p, int opt, const char *name);
-YAZ_EXPORT int odr_integer(ODR o, int **p, int opt, const char *name);
-YAZ_EXPORT int odr_enum(ODR o, int **p, int opt, const char *name);
-YAZ_EXPORT int odr_implicit_settag(ODR o, int zclass, int tag);
-YAZ_EXPORT int ber_enclen(ODR o, int len, int lenlen, int exact);
-YAZ_EXPORT int ber_declen(const unsigned char *buf, int *len);
-YAZ_EXPORT void odr_prname(ODR o, const char *name);
-YAZ_EXPORT int ber_null(ODR o);
-YAZ_EXPORT int odr_null(ODR o, Odr_null **p, int opt, const char *name);
-YAZ_EXPORT int ber_integer(ODR o, int *val);
-YAZ_EXPORT int odr_constructed_begin(ODR o, void *p, int zclass, int tag,
-                                    const char *name);
-YAZ_EXPORT int odr_constructed_end(ODR o);
-YAZ_EXPORT int odr_sequence_begin(ODR o, void *p, int size, const char *name);
-YAZ_EXPORT int odr_set_begin(ODR o, void *p, int size, const char *name);
-YAZ_EXPORT int odr_sequence_end(ODR o);
-YAZ_EXPORT int odr_set_end(ODR o);
-YAZ_EXPORT int ber_octetstring(ODR o, Odr_oct *p, int cons);
-YAZ_EXPORT int odr_octetstring(ODR o, Odr_oct **p, int opt, const char *name);
-YAZ_EXPORT int odp_more_chunks(ODR o, const unsigned char *base, int len);
-YAZ_EXPORT int odr_constructed_more(ODR o);
-YAZ_EXPORT int odr_bitstring(ODR o, Odr_bitmask **p, int opt,
-                            const char *name);
-YAZ_EXPORT int ber_bitstring(ODR o, Odr_bitmask *p, int cons);
-YAZ_EXPORT int odr_generalstring(ODR o, char **p, int opt, const char *name);
-YAZ_EXPORT int ber_oidc(ODR o, Odr_oid *p);
-YAZ_EXPORT int odr_oid(ODR o, Odr_oid **p, int opt, const char *name);
-YAZ_EXPORT int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp,
-                         const char *name);
-YAZ_EXPORT int odr_cstring(ODR o, char **p, int opt, const char *name);
-YAZ_EXPORT int odr_sequence_of(ODR o, Odr_fun type, void *p, int *num,
-                              const char *name);
-YAZ_EXPORT int odr_set_of(ODR o, Odr_fun type, void *p, int *num,
-                         const char *name);
-YAZ_EXPORT int odr_any(ODR o, Odr_any **p, int opt, const char *name);
-YAZ_EXPORT int ber_any(ODR o, Odr_any **p);
-YAZ_EXPORT int completeBER(const unsigned char *buf, int len);
-YAZ_EXPORT void odr_begin(ODR o);
-YAZ_EXPORT void odr_end(ODR o);
-YAZ_EXPORT Odr_oid *odr_oiddup(ODR odr, Odr_oid *o);
-YAZ_EXPORT Odr_oid *odr_oiddup_nmem(NMEM nmem, Odr_oid *o);
-YAZ_EXPORT int odr_grow_block(odr_ecblock *b, int min_bytes);
-YAZ_EXPORT int odr_write(ODR o, unsigned char *buf, int bytes);
-YAZ_EXPORT int odr_seek(ODR o, int whence, int offset);
-YAZ_EXPORT int odr_dumpBER(FILE *f, const char *buf, int len);
-YAZ_EXPORT void odr_choice_bias(ODR o, int what);
-YAZ_EXPORT void odr_choice_enable_bias(ODR o, int mode);
-YAZ_EXPORT int odr_total(ODR o);
-YAZ_EXPORT char *odr_errmsg(int n);
-YAZ_EXPORT Odr_oid *odr_getoidbystr(ODR o, char *str);
-YAZ_EXPORT Odr_oid *odr_getoidbystr_nmem(NMEM o, char *str);
-YAZ_EXPORT int odr_initmember(ODR o, void *p, int size);
-YAZ_EXPORT int odr_peektag(ODR o, int *zclass, int *tag, int *cons);
-YAZ_EXPORT void odr_setlenlen(ODR o, int len);
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <odr_use.h>
-
-#include <xmalloc.h>
-
-#endif
diff --git a/include/odr_use.h b/include/odr_use.h
deleted file mode 100644 (file)
index b0132ca..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Id: odr_use.h,v 1.9 1999-04-20 09:56:48 adam Exp $
- */
-
-#ifndef ODR_USE_H
-#define ODR_USE_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Odr_external
-{
-    Odr_oid *direct_reference;       /* OPTIONAL */
-    int     *indirect_reference;     /* OPTIONAL */
-    char    *descriptor;             /* OPTIONAL */
-    int which;
-#define ODR_EXTERNAL_single 0
-#define ODR_EXTERNAL_octet 1
-#define ODR_EXTERNAL_arbitrary 2
-    union
-    {
-       Odr_any  *single_ASN1_type;
-       Odr_oct  *octet_aligned; 
-       Odr_bitmask *arbitrary;      /* we aren't really equipped for this*/
-    } u;
-} Odr_external;
-
-YAZ_EXPORT int odr_external(ODR o, Odr_external **p, int opt,
-                           const char *name);
-YAZ_EXPORT int odr_visiblestring(ODR o, char **p, int opt,
-                                const char *name);
-YAZ_EXPORT int odr_graphicstring(ODR o, char **p, int opt,
-                                const char *name);
-YAZ_EXPORT int odr_generalizedtime(ODR o, char **p, int opt,
-                                  const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/oid.h b/include/oid.h
deleted file mode 100644 (file)
index df828a8..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Id: oid.h,v 1.34 1999-09-13 12:51:14 adam Exp $
- */
-
-#ifndef OID_H
-#define OID_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define OID_SIZE 20
-    
-typedef enum oid_proto
-{
-    PROTO_NOP=0,
-    PROTO_Z3950,
-    PROTO_SR,
-    PROTO_GENERAL,
-    PROTO_WAIS
-} oid_proto;
-
-typedef enum oid_class
-{
-    CLASS_NOP=0,
-    CLASS_APPCTX,
-    CLASS_ABSYN,
-    CLASS_ATTSET,
-    CLASS_TRANSYN,
-    CLASS_DIAGSET,
-    CLASS_RECSYN,
-    CLASS_RESFORM,
-    CLASS_ACCFORM,
-    CLASS_EXTSERV,
-    CLASS_USERINFO,
-    CLASS_ELEMSPEC,
-    CLASS_VARSET,
-    CLASS_SCHEMA,
-    CLASS_TAGSET,
-    CLASS_GENERAL
-} oid_class;
-
-typedef enum oid_value
-{
-    VAL_NOP=0,
-    VAL_APDU,
-    VAL_BER,
-    VAL_BASIC_CTX,
-    VAL_BIB1,
-    VAL_EXP1,
-    VAL_EXT1,
-    VAL_CCL1,
-    VAL_GILS,
-    VAL_WAIS,
-    VAL_STAS,
-    VAL_COLLECT1,
-    VAL_CIMI1,
-    VAL_GEO,
-    VAL_DIAG1,
-    VAL_ISO2709,
-    VAL_UNIMARC,
-    VAL_INTERMARC,
-    VAL_CCF,
-    VAL_USMARC,
-    VAL_UKMARC,
-    VAL_NORMARC,
-    VAL_LIBRISMARC,
-    VAL_DANMARC,
-    VAL_FINMARC,
-    VAL_MAB,
-    VAL_CANMARC,
-    VAL_SBN,
-    VAL_PICAMARC,
-    VAL_AUSMARC,
-    VAL_IBERMARC,
-    VAL_CATMARC,
-    VAL_MALMARC,
-    VAL_EXPLAIN,
-    VAL_SUTRS,
-    VAL_OPAC,
-    VAL_SUMMARY,
-    VAL_GRS0,
-    VAL_GRS1,
-    VAL_EXTENDED,
-    VAL_FRAGMENT,
-    VAL_RESOURCE1,
-    VAL_RESOURCE2,
-    VAL_PROMPT1,
-    VAL_DES1,
-    VAL_KRB1,
-    VAL_PRESSET,
-    VAL_PQUERY,
-    VAL_PCQUERY,
-    VAL_ITEMORDER,
-    VAL_DBUPDATE0,
-    VAL_DBUPDATE,
-    VAL_EXPORTSPEC,
-    VAL_EXPORTINV,
-    VAL_NONE,
-    VAL_SETM,
-    VAL_SETG,
-    VAL_VAR1,
-    VAL_ESPEC1,
-    VAL_SOIF,
-    VAL_SEARCHRES1,
-    VAL_THESAURUS,
-    VAL_CHARLANG,
-    VAL_USERINFO1,
-    VAL_MULTISRCH1,
-    VAL_MULTISRCH2,
-    VAL_DATETIME,
-    VAL_SQLRS,
-    VAL_PDF,
-    VAL_POSTSCRIPT,
-    VAL_HTML,
-    VAL_TIFF,
-    VAL_GIF,
-    VAL_JPEG,
-    VAL_PNG,
-    VAL_MPEG,
-    VAL_SGML,
-    VAL_TIFFB,
-    VAL_WAV,
-    VAL_UPDATEES,
-    VAL_TEXT_XML,
-    VAL_APPLICATION_XML,
-    VAL_UNIVERSE_REPORT,
-    VAL_PROXY,
-    VAL_COOKIE,
-    VAL_CLIENT_IP,
-/* add new types here... */
-
-/* VAL_DYNAMIC must have highest value */
-    VAL_DYNAMIC,
-    VAL_MAX = VAL_DYNAMIC+30
-} oid_value;
-
-typedef struct oident
-{
-    oid_proto proto;
-    oid_class oclass;
-    oid_value value;
-    int oidsuffix[OID_SIZE];
-    char *desc;
-} oident;
-
-YAZ_EXPORT int *oid_getoidbyent(struct oident *ent);
-YAZ_EXPORT int *oid_ent_to_oid(struct oident *ent, int *dst);
-YAZ_EXPORT struct oident *oid_getentbyoid(int *o);
-YAZ_EXPORT void oid_oidcpy(int *t, int *s);
-YAZ_EXPORT void oid_oidcat(int *t, int *s);
-YAZ_EXPORT int oid_oidcmp(int *o1, int *o2);
-YAZ_EXPORT int oid_oidlen(int *o);
-YAZ_EXPORT oid_value oid_getvalbyname(const char *name);
-YAZ_EXPORT void oid_setprivateoids(oident *list);
-YAZ_EXPORT struct oident *oid_addent (int *oid, enum oid_proto proto,
-                                     enum oid_class oclass,
-                                     const char *desc, int value);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/options.h b/include/options.h
deleted file mode 100644 (file)
index 49bf66a..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: options.h,v $
- * Revision 1.6  1997-09-01 08:49:50  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.5  1997/05/14 06:53:43  adam
- * C++ support.
- *
- * Revision 1.4  1995/09/29 17:12:05  quinn
- * Smallish
- *
- * Revision 1.3  1995/09/27  15:02:48  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.2  1995/05/16  08:50:36  quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.1  1995/03/30  09:39:42  quinn
- * Moved .h files to include directory
- *
- * Revision 1.1  1995/03/27  08:35:19  quinn
- * Created util library
- * Added memory debugging module. Imported options-manager
- *
- * Revision 1.2  1994/08/16  16:16:03  adam
- * bfile header created.
- *
- * Revision 1.1  1994/08/16  16:04:35  adam
- * Added header file options.h
- *
- */
-
-#ifndef OPTIONS_H
-#define OPTIONS_H
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT int options (const char *desc, char **argv, int argc, char **arg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-       
diff --git a/include/otherinfo.h b/include/otherinfo.h
deleted file mode 100644 (file)
index bab065f..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1999, Index Data
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Id: otherinfo.h,v 1.2 1999-09-13 12:51:35 adam Exp $
- */
-#ifndef OTHERINFO_H
-#define OTHERINFO_H
-
-#include <proto.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT void yaz_oi_APDU(Z_APDU *apdu, Z_OtherInformation ***oip);
-YAZ_EXPORT    Z_OtherInformationUnit *yaz_oi_update (
-    Z_OtherInformation **otherInformationP, ODR odr,
-    int *oid, int categoryValue, int delete_flag);
-YAZ_EXPORT void yaz_oi_set_string_oid (
-    Z_OtherInformation **otherInformation, ODR odr,
-    int *oid, int categoryValue,
-    const char *str);
-YAZ_EXPORT void yaz_oi_set_string_oidval (
-    Z_OtherInformation **otherInformation, ODR odr,
-    int oidval, int categoryValue,
-    const char *str);
-YAZ_EXPORT char *yaz_oi_get_string_oid (
-    Z_OtherInformation **otherInformation,
-    int *oid, int categoryValue, int delete_flag);
-YAZ_EXPORT char *yaz_oi_get_string_oidval(
-    Z_OtherInformation **otherInformation,
-    int oidval, int categoryValue, int delete_flag);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/pquery.h b/include/pquery.h
deleted file mode 100644 (file)
index c532f21..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1995-1996, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: pquery.h,v $
- * Revision 1.8  1997-09-01 08:49:50  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.7  1997/05/14 06:53:43  adam
- * C++ support.
- *
- * Revision 1.6  1996/08/12 14:09:24  adam
- * Default prefix query attribute set defined by using p_query_attset.
- *
- * Revision 1.5  1996/03/15  11:01:46  adam
- * Extra argument to p_query_rpn: protocol.
- * Extra arguments to p_query_scan: protocol and attributeSet.
- *
- * Revision 1.4  1995/09/29  17:12:05  quinn
- * Smallish
- *
- * Revision 1.3  1995/09/27  15:02:49  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.2  1995/05/26  08:56:05  adam
- * New function: p_query_scan.
- *
- * Revision 1.1  1995/05/22  15:31:05  adam
- * New function, p_query_rpn, to convert from prefix (ascii) to rpn (asn).
- *
- */
-
-#ifndef PQUERY_H
-#define PQUERY_H
-
-#include <yconfig.h>
-#include <proto.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT Z_RPNQuery *p_query_rpn (ODR o, oid_proto proto, const char *qbuf);
-
-YAZ_EXPORT Z_AttributesPlusTerm *p_query_scan (ODR o, oid_proto proto,
-           Odr_oid **attributeSetP, const char *qbuf);
-YAZ_EXPORT int p_query_attset (const char *arg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-acc.h b/include/prt-acc.h
deleted file mode 100644 (file)
index 1f4bdca..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: prt-acc.h,v $
- * Revision 1.9  1999-04-20 09:56:48  adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.8  1997/09/01 08:49:51  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.7  1997/05/14 06:53:46  adam
- * C++ support.
- *
- * Revision 1.6  1996/01/02 08:57:35  quinn
- * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
- *
- * Revision 1.5  1995/09/29  17:12:09  quinn
- * Smallish
- *
- * Revision 1.4  1995/09/27  15:02:49  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.3  1995/08/17  12:45:16  quinn
- * Fixed minor problems with GRS-1. Added support in c&s.
- *
- * Revision 1.2  1995/08/15  12:00:13  quinn
- * Updated External
- *
- * Revision 1.1  1995/06/02  09:49:49  quinn
- * Add access control
- *
- *
- */
-
-#ifndef PRT_ACC_H
-#define PRT_ACC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_Encryption1
-{
-    Odr_oct *cryptType;       /* OPTIONAL */
-    Odr_oct *credential;      /* OPTIONAL */
-    Odr_oct *data;
-} Z_Encryption1;
-
-typedef struct Z_EnumeratedPrompt1
-{
-    int *type;
-#define Z_Prompt1_groupId        0
-#define Z_Prompt1_userId         1
-#define Z_Prompt1_password       2
-#define Z_Prompt1_newPassword    3
-#define Z_Prompt1_copyright      4
-    char *suggestedString;       /* OPTIONAL */
-} Z_EnumeratedPrompt1;
-
-typedef struct Z_PromptId1
-{
-    int which;
-#define Z_PromptId1_enumeratedPrompt 0
-#define Z_PromptId1_nonEnumeratedPrompt 1
-    union
-    {
-       Z_EnumeratedPrompt1 *enumeratedPrompt;
-       char *nonEnumeratedPrompt;
-    } u;
-} Z_PromptId1;
-
-typedef struct Z_PromptInfo1
-{
-    int which;
-#define Z_Challenge1_character 0
-#define Z_Challenge1_encrypted 1
-    union
-    {
-       char *character;
-       Z_Encryption1 *encrypted;
-    } u;
-} Z_PromptInfo1;
-
-typedef struct Z_ChallengeUnit1
-{
-    Z_PromptId1 *promptId;
-    char *defaultResponse;           /* OPTIONAL */
-    Z_PromptInfo1 *promptInfo;       /* OPTIONAL */
-    char *regExpr;                   /* OPTIONAL */
-    Odr_null *responseRequired;      /* OPTIONAL */
-    int num_values;
-    char **allowedValues;            /* OPTIONAL */
-    Odr_null *shouldSave;            /* OPTIONAL */
-    int *dataType;                   /* OPTIONAL */
-#define Z_ChalDataType_integer       1
-#define Z_ChalDataType_date          2
-#define Z_ChalDataType_float         3
-#define Z_ChalDataType_alphaNumeric  4
-#define Z_ChalDataType_urlUrn        5
-#define Z_ChalDataType_boolean       6
-    Z_External *diagnostic;        /* OPTIONAL */
-} Z_ChallengeUnit1;
-
-typedef struct Z_Challenge1
-{
-    int num_challenges;
-    Z_ChallengeUnit1 **list;
-} Z_Challenge1;
-
-typedef struct Z_ResponseUnit1
-{
-    Z_PromptId1 *promptId;
-    int which;
-#define Z_Response1_string 0
-#define Z_Response1_accept 1
-#define Z_Response1_acknowledge 2
-#define Z_Response1_diagnostic 3
-#define Z_Response1_encrypted 4
-    union
-    {
-       char *string;
-       bool_t *accept;
-       Odr_null *acknowledge;
-       Z_DiagRec *diagnostic;
-       Z_Encryption1 *encrypted;
-    } u;
-} Z_ResponseUnit1;
-
-typedef struct Z_Response1
-{
-    int num_responses;
-    Z_ResponseUnit1 **list;
-} Z_Response1;
-
-typedef struct Z_PromptObject1
-{
-    int which;
-#define Z_PromptObject1_challenge 0
-#define Z_PromptObject1_response 1
-    union
-    {
-       Z_Challenge1 *challenge;
-       Z_Response1 *response;
-    } u;
-} Z_PromptObject1;
-
-YAZ_EXPORT int z_PromptObject1(ODR o, Z_PromptObject1 **p, int opt,
-                              const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-add.h b/include/prt-add.h
deleted file mode 100644 (file)
index 112958b..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: prt-add.h,v $
- * Revision 1.4  1999-04-20 09:56:48  adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.3  1997/05/14 06:53:46  adam
- * C++ support.
- *
- * Revision 1.2  1997/04/30 08:52:09  quinn
- * Null
- *
- * Revision 1.1  1996/10/10  11:51:58  quinn
- * Added SerchResult additional info
- *
- *
- */
-
-#ifndef PRT_ADD_H
-#define PRT_ADD_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_QueryExpressionTerm
-{
-    Z_Term *queryTerm;
-    char *termComment;              /* OPTIONAL */
-} Z_QueryExpressionTerm;
-
-typedef struct Z_QueryExpression
-{
-    int which;
-#define Z_QueryExpression_term 1
-#define Z_QueryExpression_query 2
-    union {
-       Z_QueryExpressionTerm *term;
-       Z_Query *query;
-    } u;
-} Z_QueryExpression;
-
-typedef struct Z_ResultsByDBList
-{
-    int num;
-    Z_DatabaseName **elements;
-} Z_ResultsByDBList;
-
-typedef struct Z_ResultsByDB_elem
-{
-    int which;
-#define Z_ResultsByDB_all 1
-#define Z_ResultsByDB_list 2
-    union {
-        Odr_null *all;
-        Z_ResultsByDBList *list;
-    } u;
-    int *count;                           /* OPTIONAL */
-    char *resultSetName; /* OPTIONAL */
-} Z_ResultsByDB_elem;
-
-typedef struct Z_ResultsByDB
-{
-    int num;
-    Z_ResultsByDB_elem **elements;
-} Z_ResultsByDB;
-
-typedef struct Z_SearchInfoReport_elem
-{
-    char *subqueryId;                          /* OPTIONAL */
-    bool_t *fullQuery;
-    Z_QueryExpression *subqueryExpression;     /* OPTIONAL */
-    Z_QueryExpression *subqueryInterpretation; /* OPTIONAL */
-    Z_QueryExpression *subqueryRecommendation; /* OPTIONAL */
-    int *subqueryCount;                        /* OPTIONAL */
-    Z_IntUnit *subqueryWeight;                 /* OPTIONAL */
-    Z_ResultsByDB *resultsByDB;                /* OPTIONAL */
-} Z_SearchInfoReport_elem;
-
-typedef struct Z_SearchInfoReport
-{
-    int num;
-    Z_SearchInfoReport_elem **elements;
-} Z_SearchInfoReport;
-
-int z_SearchInfoReport (ODR o, Z_SearchInfoReport **p, int opt,
-                       const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-arc.h b/include/prt-arc.h
deleted file mode 100644 (file)
index df159c7..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1995,1996 Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_ARC_H
-#define PRT_ARC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ------------------- Summary Record --------------------- */
-
-typedef struct Z_FormatSpec
-{
-    char *type;
-    int *size;                    /* OPTIONAL */
-    int *bestPosn;                /* OPTIONAL */
-} Z_FormatSpec;
-
-typedef struct Z_BriefBib
-{
-    char *title;
-    char *author;                  /* OPTIONAL */
-    char *callNumber;              /* OPTIONAL */
-    char *recordType;              /* OPTIONAL */
-    char *bibliographicLevel;      /* OPTIONAL */
-    int num_format;
-    Z_FormatSpec **format;         /* OPTIONAL */
-    char *publicationPlace;        /* OPTIONAL */
-    char *publicationDate;         /* OPTIONAL */
-    char *targetSystemKey;         /* OPTIONAL */
-    char *satisfyingElement;       /* OPTIONAL */
-    int *rank;                     /* OPTIONAL */
-    char *documentId;              /* OPTIONAL */
-    char *abstract;                /* OPTIONAL */
-    Z_OtherInformation *otherInfo; /* OPTIONAL */
-} Z_BriefBib;
-
-/* ------------------- OPAC Record --------------------- */
-
-typedef struct Z_CircRecord
-{
-    bool_t *availableNow;
-    char *availabilityDate;        /* OPTIONAL */
-    char *availableThru;           /* OPTIONAL */
-    char *restrictions;            /* OPTIONAL */
-    char *itemId;                  /* OPTIONAL */
-    bool_t *renewable;
-    bool_t *onHold;
-    char *enumAndChron;            /* OPTIONAL */
-    char *midspine;                /* OPTIONAL */
-    char *temporaryLocation;       /* OPTIONAL */
-} Z_CircRecord;
-
-typedef struct Z_Volume
-{
-    char *enumeration;             /* OPTIONAL */
-    char *chronology;              /* OPTIONAL */
-    char *enumAndChron;            /* OPTIONAL */
-} Z_Volume;
-
-typedef struct Z_HoldingsAndCircData
-{
-    char *typeOfRecord;            /* OPTIONAL */
-    char *encodingLevel;           /* OPTIONAL */
-    char *format;                  /* OPTIONAL */
-    char *receiptAcqStatus;        /* OPTIONAL */
-    char *generalRetention;        /* OPTIONAL */
-    char *completeness;            /* OPTIONAL */
-    char *dateOfReport;            /* OPTIONAL */
-    char *nucCode;                 /* OPTIONAL */
-    char *localLocation;           /* OPTIONAL */
-    char *shelvingLocation;        /* OPTIONAL */
-    char *callNumber;              /* OPTIONAL */
-    char *shelvingData;            /* OPTIONAL */
-    char *copyNumber;              /* OPTIONAL */
-    char *publicNote;              /* OPTIONAL */
-    char *reproductionNote;        /* OPTIONAL */
-    char *termsUseRepro;           /* OPTIONAL */
-    char *enumAndChron;            /* OPTIONAL */
-    int num_volumes;
-    Z_Volume **volumes;            /* OPTIONAL */
-    int num_circulationData;
-    Z_CircRecord **circulationData;/* OPTIONAL */
-} Z_HoldingsAndCircData;
-
-typedef struct Z_HoldingsRecord
-{
-    int which;
-#define Z_HoldingsRecord_marcHoldingsRecord    0
-#define Z_HoldingsRecord_holdingsAndCirc       1
-    union
-    {
-       Z_External *marcHoldingsRecord;
-       Z_HoldingsAndCircData *holdingsAndCirc;
-    } u;
-} Z_HoldingsRecord;
-
-typedef struct Z_OPACRecord
-{
-    Z_External *bibliographicRecord;   /* OPTIONAL */
-    int num_holdingsData;
-    Z_HoldingsRecord **holdingsData;   /* OPTIONAL */
-} Z_OPACRecord;
-
-YAZ_EXPORT int z_BriefBib(ODR o, Z_BriefBib **p, int opt, const char *name);
-YAZ_EXPORT int z_OPACRecord(ODR o, Z_OPACRecord **p, int opt,
-                           const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-dat.h b/include/prt-dat.h
deleted file mode 100644 (file)
index 5a1ef6b..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * This file is part of the YAZ toolkit:
- * Copyright (c) 1998, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * Contribution by Ronald van Der Meer (RVDM):
- *  Databasix Information Systems B.V., Utrecht, The Netherlands.
- *
- * $Log: prt-dat.h,v $
- * Revision 1.2  1999-04-20 09:56:48  adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.1  1998/02/10 15:31:52  adam
- * Implemented date and time structure. Changed the Update Extended
- * Service.
- *
- */
-
-#ifndef __PRT_DAT_H
-#define __PRT_DAT_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_MonthAndDay
-{
-    int *month;
-    int *day;                               /* OPTIONAL */
-} Z_MonthAndDay;
-
-typedef struct Z_Quarter
-{
-    int which;
-#define Z_Quarter_first                0
-#define Z_Quarter_second       1
-#define Z_Quarter_third                2
-#define Z_Quarter_fourth       3
-    union
-    {
-       Odr_null *first;
-       Odr_null *second;
-       Odr_null *third;
-       Odr_null *fourth;
-    } u;
-} Z_Quarter;
-
-typedef struct Z_Season
-{
-    int which;
-#define Z_Season_winter                0
-#define Z_Season_spring                1
-#define Z_Season_summer                2
-#define Z_Season_autumn                3
-    union
-    {
-       Odr_null *winter;
-       Odr_null *spring;
-       Odr_null *summer;
-       Odr_null *autumn;
-    } u;
-} Z_Season;
-
-typedef struct Z_PartOfYear
-{
-    int which;
-#define Z_PartOfYear_monthAndDay       0
-#define Z_PartOfYear_julianDay         1
-#define Z_PartOfYear_weekNumber                2
-#define Z_PartOfYear_quarter           3
-#define Z_PartOfYear_season            4
-    union
-    {
-       Z_MonthAndDay *monthAndDay;
-       int *julianDay; 
-       int *weekNumber; 
-       Z_Quarter *quarter;
-       Z_Season *season;
-    } u;
-} Z_PartOfYear;
-
-typedef struct Z_Era
-{
-    int which;
-#define Z_Era_decade           0
-#define Z_Era_century          1
-#define Z_Era_millennium       2
-    union
-    {
-       Odr_null *decade;
-       Odr_null *century;
-       Odr_null *millennium;
-    } u;
-} Z_Era;
-
-typedef struct Z_DateFlags
-{
-    Odr_null *circa;                        /* OPTIONAL */
-    Z_Era *era;                             /* OPTIONAL */
-} Z_DateFlags;
-
-typedef struct Z_Date
-{
-    int *year;
-    Z_PartOfYear *partOfYear;               /* OPTIONAL */
-    Z_DateFlags *flags;                     /* OPTIONAL */
-} Z_Date;
-
-typedef struct Z_Zone
-{
-    int which;
-#define Z_Zone_local           0
-#define Z_Zone_utc             1
-#define Z_Zone_utcOffset       2
-    union
-    {
-       Odr_null *local;
-       Odr_null *utc;
-       int *utcOffset;
-    } u;
-} Z_Zone;
-
-typedef struct Z_Time
-{
-    int *hour;
-    int *minute;                            /* OPTIONAL */
-    int *second;                            /* OPTIONAL */
-    Z_IntUnit *partOfSecond;                /* OPTIONAL */
-    Z_Zone *zone;                           /* OPTIONAL */
-} Z_Time;
-
-typedef struct Z_DateTime
-{
-    Z_Date *z3950Date;                      /* OPTIONAL */
-    Z_Time *z3950Time;                      /* OPTIONAL */
-} Z_DateTime;
-
-YAZ_EXPORT int z_DateTime(ODR o, Z_DateTime **p, int opt, const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-dia.h b/include/prt-dia.h
deleted file mode 100644 (file)
index a693665..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_DIA_H
-#define PRT_DIA_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_TooMany
-{
-    int *tooManyWhat;
-#define Z_TooMany_argumentWords        1
-#define Z_TooMany_truncatedWords       2
-#define Z_TooMany_booleanOperators     3
-#define Z_TooMany_incompleteSubfields  4
-#define Z_TooMany_characters           5
-#define Z_TooMany_recordsRetrieved     6
-#define Z_TooMany_databasesSpecified   7
-#define Z_TooMany_resultSetsCreated    8
-#define Z_TooMany_indexTermsProcessed  9
-    int *max;                    /* OPTIONAL */
-} Z_TooMany;
-
-typedef struct Z_BadSpec
-{
-    Z_Specification *spec;
-    char *db;                    /* OPTIONAL */
-    int num_goodOnes;
-    Z_Specification **goodOnes;  /* OPTIONAL */
-} Z_BadSpec;
-
-typedef struct Z_DbUnavailWhy
-{
-    int *reasonCode;             /* OPTIONAL */
-#define Z_DbUnavail_doesNotExist         0
-#define Z_DbUnavail_existsButUnavail     1
-#define Z_DbUnavail_locked               2
-#define Z_DbUnavail_accessDenied         3
-    char *message;               /* OPTIONAL */
-} Z_DbUnavailWhy;
-
-typedef struct Z_DbUnavail
-{
-    char *db;
-    Z_DbUnavailWhy *why;         /* OPTIONAL */
-} Z_DbUnavail;
-
-typedef struct Z_Attribute
-{
-    Odr_oid *id;
-    int *type;                   /* OPTIONAL */
-    int *value;                  /* OPTIONAL */
-    Z_Term *term;                /* OPTIONAL */
-} Z_Attribute;
-
-typedef struct Z_AttCombo
-{
-    Z_AttributeList *unsupportedCombination;
-    int num_alternatives;
-    Z_AttributeList **alternatives;    /* OPTIONAL */
-} Z_AttCombo;
-
-typedef struct Z_DiagTerm 
-{
-    int *problem;                /* OPTIONAL */
-#define Z_DiagtermProb_codedValue     1
-#define Z_DiagtermProb_unparsable     2
-#define Z_DiagtermProb_tooShort       3
-#define Z_DiagtermProb_type           4
-    Z_Term *term;
-} Z_DiagTerm;
-
-typedef struct Z_Proximity
-{
-    int which;
-#define Z_Proximity_resultSets 0
-#define Z_Proximity_badSet 1
-#define Z_Proximity_relation 2
-#define Z_Proximity_unit 3
-#define Z_Proximity_distance 4
-#define Z_Proximity_attributes 5
-#define Z_Proximity_ordered 6
-#define Z_Proximity_exclusion 7
-    union
-    {
-       Odr_null *resultSets;
-       char *badSet;
-       int *relation;
-       int *unit;
-       int *distance;
-       Z_AttributeList *attributes;
-       Odr_null *ordered;
-       Odr_null *exclusion;
-    } u;
-} Z_Proximity;
-
-typedef struct Z_AttrListList
-{
-    int num_lists;
-    Z_AttributeList *lists;
-} Z_AttrListList;
-
-typedef struct Z_Scan
-{
-    int which;
-#define Z_ScanD_nonZeroStepSize 0
-#define Z_ScanD_specifiedStepSize 1
-#define Z_ScanD_termList1 2
-#define Z_ScanD_termList2 3
-#define Z_ScanD_posInResponse 4
-#define Z_ScanD_resources 5
-#define Z_ScanD_endOfList 6
-    union
-    {
-       Odr_null *nonZeroStepSize;
-       Odr_null *specifiedStepSize;
-       Odr_null *termList1;
-       Z_AttrListList *termList2;
-       int *posInResponse;
-#define Z_ScanPosInRsp_mustBeOne         1
-#define Z_ScanPosInRsp_mustBePositive    2
-#define Z_ScanPosInRsp_mustBeNonNegative 3
-#define Z_ScanPosInRsp_other             4
-       Odr_null *resources;
-       Odr_null *endOfList;
-    } u;
-} Z_Scan;
-
-typedef struct Z_Sort
-{
-    int which;
-#define Z_SortD_sequence 0
-#define Z_SortD_noRsName 1
-#define Z_SortD_tooMany 2
-#define Z_SortD_incompatible 3
-#define Z_SortD_generic 4
-#define Z_SortD_dbSpecific 5
-#define Z_SortD_sortElement 6
-#define Z_SortD_key 7
-#define Z_SortD_action 8
-#define Z_SortD_illegal 9
-#define Z_SortD_inputTooLarge 10
-#define Z_SortD_aggregateTooLarge 11
-    union
-    {
-       Odr_null *sequence;
-       Odr_null *noRsName;
-       int *tooMany;
-       Odr_null *incompatible;
-       Odr_null *generic;
-       Odr_null *dbSpecific;
-       int *key;
-#define Z_SortKey_tooMany       1
-#define Z_SortKey_duplicate     2
-       Odr_null *action;
-       int *illegal;
-#define Z_SortIllegal_relation  1
-#define Z_SortIllegal_case      2
-#define Z_SortIllegal_action    3
-#define Z_SortIllegal_sort      4
-       Z_StringList *inputTooLarge;
-       Odr_null *aggregateTooLarge;
-    } u;
-} Z_Sort;
-
-typedef struct Z_Segmentation
-{
-    int which;
-#define Z_SegmentationD_segments 0
-    union
-    {
-       Odr_null *segments;
-    } u;
-} Z_Segmentation;
-
-typedef struct Z_ExtServices
-{
-    int which;
-#define Z_ExtServicesD_req 0
-#define Z_ExtServicesD_permission 1
-#define Z_ExtServicesD_immediate 2
-    union
-    {
-       int *req;
-#define Z_ExtSrvReq_nameInUse           1
-#define Z_ExtSrvReq_noSuchname          2
-#define Z_ExtSrvReq_quota               3
-#define Z_ExtSrvReq_type                4
-       int *permission;
-#define Z_ExtSrvPerm_id                 1
-#define Z_ExtSrvPerm_modifyDelete       2
-       int *immediate;
-#define Z_ExtSrvImm_failed              1
-#define Z_ExtSrvImm_service             2
-#define Z_ExtSrvImm_parameters          3
-    } u;
-} Z_ExtServices;
-
-typedef struct Z_OidList
-{
-    int num_oids;
-    Odr_oid **oids;
-} Z_OidList;
-
-typedef struct Z_AccessCtrl
-{
-    int which;
-#define Z_AccessCtrlD_noUser 0
-#define Z_AccessCtrlD_refused 1
-#define Z_AccessCtrlD_simple 2
-#define Z_AccessCtrlD_oid 3
-#define Z_AccessCtrlD_alternative 4
-#define Z_AccessCtrlD_pwdInv 5
-#define Z_AccessCtrlD_pwdExp 6
-    union
-    {
-       Odr_null *noUser;
-       Odr_null *refused;
-       Odr_null *simple;
-       Z_OidList *oid;
-       Z_OidList *alternative;
-       Odr_null *pwdInv;
-       Odr_null *pwdExp;
-    } u;
-} Z_AccessCtrl;
-
-typedef struct Z_RecordSyntax
-{
-    Odr_oid *unsupportedSyntax;
-    int num_suggestedAlternatives;           /* OPTIONAL */
-    Odr_oid **suggestedAlternatives;           /* OPTIONAL */
-} Z_RecordSyntax;
-
-typedef struct Z_DiagFormat
-{
-    int which;
-#define Z_DiagFormat_tooMany 0
-#define Z_DiagFormat_badSpec 1
-#define Z_DiagFormat_dbUnavail 2
-#define Z_DiagFormat_unSupOp 3
-#define Z_DiagFormat_attribute 4
-#define Z_DiagFormat_attCombo 5
-#define Z_DiagFormat_term 6
-#define Z_DiagFormat_proximity 7
-#define Z_DiagFormat_scan 8
-#define Z_DiagFormat_sort 9
-#define Z_DiagFormat_segmentation 10
-#define Z_DiagFormat_extServices 11
-#define Z_DiagFormat_accessCtrl 12
-#define Z_DiagFormat_recordSyntax 13
-    union
-    {
-       Z_TooMany *tooMany;
-       Z_BadSpec *badSpec;
-       Z_DbUnavail *dbUnavail;
-       int *unSupOp;
-#define Z_UnSupOp_and             0
-#define Z_UnSupOp_or              1
-#define Z_UnSupOp_and_not         2
-#define Z_UnSupOp_prox            3
-       Z_Attribute *attribute;
-       Z_AttributeList *attCombo;
-       Z_DiagTerm *term;
-       Z_Proximity *proximity;
-       Z_Scan *scan;
-       Z_Sort *sort;
-       Z_Segmentation *segmentation;
-       Z_ExtServices *extServices;
-       Z_AccessCtrl *accessCtrl;
-       Z_RecordSyntax *recordSyntax;
-    } u;
-} Z_DiagFormat;
-
-typedef struct Z_Diagnostic
-{
-    int which;
-#define Z_Diagnostic_defaultDiagRec 0
-#define Z_Diagnostic_explicitDiagnostic 1
-    union 
-    {
-       Z_DefaultDiagFormat *defaultDiagRec;
-       Z_DiagFormat *explicitDiagnostic;
-    } u;
-} Z_Diagnostic;
-
-typedef struct Z_DiagnosticUnit
-{
-    Z_Diagnostic *diagnostic;                    /* OPTIONAL */
-    char *message;                               /* OPTIONAL */
-} Z_DiagnosticUnit;
-
-typedef struct Z_DiagnosticFormat
-{
-    int num_diagnostics;
-    Z_DiagnosticUnit **diagnostics;
-} Z_DiagnosticFormat;
-
-YAZ_EXPORT int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt,
-                                 const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-esp.h b/include/prt-esp.h
deleted file mode 100644 (file)
index 90b1097..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_ESP_H
-#define PRT_ESP_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_OccurValues
-{
-    int *start;
-    int *howMany;                     /* OPTIONAL */
-} Z_OccurValues;
-
-typedef struct Z_Occurrences
-{
-    int which;
-#define Z_Occurrences_all 0
-#define Z_Occurrences_last 1
-#define Z_Occurrences_values 2
-    union
-    {
-       Odr_null *all;
-       Odr_null *last;
-       Z_OccurValues *values;
-    } u;
-} Z_Occurrences;
-
-typedef struct Z_SpecificTag
-{
-    Odr_oid *schemaId;                      /* OPTIONAL */
-    int *tagType;                           /* OPTIONAL */
-    Z_StringOrNumeric *tagValue;
-    Z_Occurrences *occurrences;             /* OPTIONAL */
-} Z_SpecificTag;
-
-typedef struct Z_ETagUnit
-{
-    int which;
-#define Z_ETagUnit_specificTag 0
-#define Z_ETagUnit_wildThing 1
-#define Z_ETagUnit_wildPath 2
-    union
-    {
-       Z_SpecificTag *specificTag;
-       Z_Occurrences *wildThing;
-       Odr_null *wildPath;
-    } u;
-} Z_ETagUnit;
-
-typedef struct Z_ETagPath
-{
-    int num_tags;
-    Z_ETagUnit **tags;
-} Z_ETagPath;
-
-typedef struct Z_SimpleElement
-{
-    Z_ETagPath *path;
-    Z_Variant *variantRequest;           /* OPTIONAL */
-} Z_SimpleElement;
-
-typedef struct Z_CompoPrimitives
-{
-    int num_primitives;
-    char **primitives;
-} Z_CompoPrimitives;
-
-typedef struct Z_CompoSpecs
-{
-    int num_specs;
-    Z_SimpleElement **specs;
-} Z_CompoSpecs;
-
-typedef struct Z_CompositeElement
-{
-    int which;
-#define Z_CompoElement_primitives 0
-#define Z_CompoElement_specs 1
-    union
-    {
-       Z_CompoPrimitives *primitives;
-       Z_CompoSpecs *specs;
-    } elementList;
-    Z_ETagPath *deliveryTag;
-    Z_Variant *variantRequest;
-} Z_CompositeElement;
-
-typedef struct Z_ElementRequest
-{
-    int which;
-#define Z_ERequest_simpleElement 0
-#define Z_ERequest_compositeElement 1
-    union
-    {
-       Z_SimpleElement *simpleElement;
-       Z_CompositeElement *compositeElement;
-    } u;
-} Z_ElementRequest;
-
-typedef struct Z_Espec1
-{
-    int num_elementSetNames;
-    char **elementSetNames;               /* OPTIONAL */
-    Odr_oid *defaultVariantSetId;         /* OPTIONAL */
-    Z_Variant *defaultVariantRequest;     /* OPTIONAL */
-    int *defaultTagType;                  /* OPTIONAL */
-    int num_elements;
-    Z_ElementRequest **elements;           /* OPTIONAL */
-} Z_Espec1;
-
-YAZ_EXPORT int z_Espec1(ODR o, Z_Espec1 **p, int opt, const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-exd.h b/include/prt-exd.h
deleted file mode 100644 (file)
index 0aa67b2..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_EXD_H
-#define PRT_EXD_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_TaskPackage
-{
-    Odr_oid *packageType;                 
-    char *packageName;                      /* OPTIONAL */
-    char *userId;                           /* OPTIONAL */
-    Z_IntUnit *retentionTime;               /* OPTIONAL */
-    Z_Permissions *permissions;             /* OPTIONAL */
-    char *description;                      /* OPTIONAL */
-    Odr_oct *targetReference;             
-    char *creationDateTime;    /* OPTIONAL */
-    int *taskStatus;                      
-#define Z_TaskPackage_pending             0
-#define Z_TaskPackage_active              1
-#define Z_TaskPackage_complete            2
-#define Z_TaskPackage_aborted             3
-    int num_packageDiagnostics;
-    Z_DiagRec **packageDiagnostics;         /* OPTIONAL */
-    Z_External *taskSpecificParameters;   
-} Z_TaskPackage;
-
-int z_TaskPackage(ODR o, Z_TaskPackage **p, int opt, const char *name);
-
-/* ----------------------- ITEM ORDER ------------------------- */
-
-typedef struct Z_IOTargetPart
-{
-    Z_External *itemRequest;                   /* OPTIONAL */
-    Z_External *statusOrErrorReport;
-    int *auxiliaryStatus;                      /* OPTIONAL */
-#define Z_IOTargetPart_notReceived        1
-#define Z_IOTargetPart_loanQueue          2
-#define Z_IOTargetPart_forwarded          3
-#define Z_IOTargetPart_unfilledCopyright  4
-#define Z_IOTargetPart_filledCopyright    1
-} Z_IOTargetPart;
-
-typedef struct Z_IOResultSetItem
-{
-    char *resultSetId;
-    int *item;
-} Z_IOResultSetItem;
-
-typedef struct Z_IOOriginPartNotToKeep
-{
-    Z_IOResultSetItem *resultSetItem;          /* OPTIONAL */
-    Z_External *itemRequest;                   /* OPTIONAL */
-} Z_IOOriginPartNotToKeep;
-
-typedef struct Z_IOContact
-{
-    char *name;                                /* OPTIONAL */
-    char *phone;                               /* OPTIONAL */
-    char *email;                               /* OPTIONAL */
-} Z_IOContact;
-
-typedef struct Z_IOCreditCardInfo
-{
-    char *nameOnCard;
-    char *expirationDate;
-    char *cardNumber;
-} Z_IOCreditCardInfo;
-
-typedef struct Z_IOBilling
-{
-    int which;
-#define Z_IOBilling_billInvoice 0
-#define Z_IOBilling_prepay 1
-#define Z_IOBilling_depositAccount 2
-#define Z_IOBilling_creditCard 3
-#define Z_IOBilling_cardInfoPreviouslySupplied 4
-#define Z_IOBilling_privateKnown 5
-#define Z_IOBilling_privateNotKnown 6
-    union
-    {
-       Odr_null *noinfo;
-       Z_IOCreditCardInfo *creditCard;
-       Z_External *privateNotKnown;
-    } paymentMethod;
-    char *customerReference;                        /* OPTIONAL */
-    char *customerPONumber;                         /* OPTIONAL */
-} Z_IOBilling;
-
-typedef struct Z_IOOriginPartToKeep
-{
-    Z_External *supplDescription;              /* OPTIONAL */
-    Z_IOContact *contact;                      /* OPTIONAL */
-    Z_IOBilling *addlBilling;                  /* OPTIONAL */
-} Z_IOOriginPartToKeep;
-
-typedef struct Z_IORequest
-{
-    Z_IOOriginPartToKeep *toKeep;              /* OPTIONAL */
-    Z_IOOriginPartNotToKeep *notToKeep;
-} Z_IORequest;
-
-typedef struct Z_IOTaskPackage
-{
-    Z_IOOriginPartToKeep *originPart;          /* OPTIONAL */
-    Z_IOTargetPart *targetPart;
-} Z_IOTaskPackage;
-
-typedef struct Z_ItemOrder
-{
-    int which;
-#define Z_ItemOrder_esRequest 0
-#define Z_ItemOrder_taskPackage 1
-    union
-    {
-       Z_IORequest *esRequest;
-       Z_IOTaskPackage *taskPackage;
-    } u;
-} Z_ItemOrder;
-
-int z_ItemOrder(ODR o, Z_ItemOrder **p, int opt, const char *name);
-
-/* ----------------------- ITEM UPDATE ------------------------ */
-
-typedef struct Z_IUSuppliedRecordsId
-{
-    int which;
-#define Z_IUSuppliedRecordsId_timeStamp 1
-#define Z_IUSuppliedRecordsId_versionNumber 2
-#define Z_IUSuppliedRecordsId_previousVersion 3
-    union {
-        char *timeStamp;
-        char *versionNumber;
-        Odr_external *previousVersion;
-    } u;
-} Z_IUSuppliedRecordsId;
-
-typedef struct Z_IUCorrelationInfo
-{
-    char *note; /* OPTIONAL */
-    int *id; /* OPTIONAL */
-} Z_IUCorrelationInfo;
-
-typedef struct Z_IUSuppliedRecords_elem
-{
-    int which;
-#define Z_IUSuppliedRecords_number 1
-#define Z_IUSuppliedRecords_string 2
-#define Z_IUSuppliedRecords_opaque 3
-    union {
-        int *number;
-        char *string;
-        Odr_oct *opaque;
-    } u; /* OPTIONAL */
-    Z_IUSuppliedRecordsId *supplementalId; /* OPTIONAL */
-    Z_IUCorrelationInfo *correlationInfo;    /* OPTIONAL */
-    Z_External *record;
-} Z_IUSuppliedRecords_elem;
-
-typedef struct Z_IUSuppliedRecords
-{
-    int num;
-    Z_IUSuppliedRecords_elem **elements;
-} Z_IUSuppliedRecords;
-
-typedef struct Z_IUOriginPartToKeep
-{
-    int *action;
-#define Z_IUOriginPartToKeep_recordInsert 1
-#define Z_IUOriginPartToKeep_recordReplace 2
-#define Z_IUOriginPartToKeep_recordDelete 3
-#define Z_IUOriginPartToKeep_elementUpdate 4
-#define Z_IUOriginPartToKeep_specialUpdate 5
-    char *databaseName;
-    Odr_oid *schema;               /* OPTIONAL */
-    char *elementSetName;          /* OPTIONAL */
-    Odr_external *actionQualifier; /* OPTIONAL */
-} Z_IUOriginPartToKeep;
-
-typedef struct Z_IUTaskPackageRecordStructure
-{
-    int which;
-#define Z_IUTaskPackageRecordStructure_record 1
-#define Z_IUTaskPackageRecordStructure_surrogateDiagnostics 2
-    union {
-        Odr_external *record;
-        Z_DiagRecs *surrogateDiagnostics;
-    } u; /* OPTIONAL */
-    Z_IUCorrelationInfo *correlationInfo; /* OPTIONAL */
-    int *recordStatus;
-#define Z_IUTaskPackageRecordStructureS_success 1
-#define Z_IUTaskPackageRecordStructureS_queued 2
-#define Z_IUTaskPackageRecordStructureS_inProcess 3
-#define Z_IUTaskPackageRecordStructureS_failure 4
-    Z_DiagRecs *supplementalDiagnostics;  /* OPTIONAL */
-} Z_IUTaskPackageRecordStructure;
-
-typedef struct Z_IUTargetPart
-{
-    int *updateStatus;
-#define Z_IUTargetPart_success 1
-#define Z_IUTargetPart_partial 2
-#define Z_IUTargetPart_failure 3
-    int num_globalDiagnostics;
-    Z_DiagRec **globalDiagnostics; /* OPTIONAL */
-    int num_taskPackageRecords;
-    Z_IUTaskPackageRecordStructure **taskPackageRecords;
-} Z_IUTargetPart;
-
-typedef struct Z_IUUpdateEsRequest
-{
-    Z_IUOriginPartToKeep *toKeep;
-    Z_IUSuppliedRecords *notToKeep;
-} Z_IUUpdateEsRequest;
-
-typedef struct Z_IUUpdateTaskPackage
-{
-    Z_IUOriginPartToKeep *originPart;
-    Z_IUTargetPart *targetPart;
-} Z_IUUpdateTaskPackage;
-
-typedef struct Z_IUUpdate
-{
-    int which;
-#define Z_IUUpdate_esRequest 1
-#define Z_IUUpdate_taskPackage 2
-    union {
-        Z_IUUpdateEsRequest *esRequest;
-        Z_IUUpdateTaskPackage *taskPackage;
-    } u;
-} Z_IUUpdate;
-
-YAZ_EXPORT int z_IUUpdate(ODR o, Z_IUUpdate **p, int opt, const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-exp.h b/include/prt-exp.h
deleted file mode 100644 (file)
index e8ea68a..0000000
+++ /dev/null
@@ -1,1017 +0,0 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_EXP_H
-#define PRT_EXP_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct Z_CommonInfo
-{
-    char *dateAdded;           /* OPTIONAL */
-    char *dateChanged;         /* OPTIONAL */
-    char *expiry;              /* OPTIONAL */
-    char *humanStringLanguage;    /* OPTIONAL */
-    Z_OtherInformation *otherInfo;          /* OPTIONAL */
-} Z_CommonInfo;
-
-typedef struct Z_HumanStringUnit
-{
-    char *language;               /* OPTIONAL */
-    char *text;
-} Z_HumanStringUnit;
-
-typedef struct Z_HumanString
-{
-    int num_strings;
-    Z_HumanStringUnit **strings;
-} Z_HumanString;
-
-typedef struct Z_IconObjectUnit
-{
-    int which;
-#define Z_IconObjectUnit_ianaType 0
-#define Z_IconObjectUnit_z3950type 1
-#define Z_IconObjectUnit_otherType 2
-    char *bodyType;
-    Odr_oct *content;
-} Z_IconObjectUnit;
-
-typedef struct Z_IconObject
-{
-    int num;
-    Z_IconObjectUnit **elements;
-} Z_IconObject;
-
-typedef struct Z_ContactInfo
-{
-    char *name;                             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_HumanString *address;                 /* OPTIONAL */
-    char *email;                            /* OPTIONAL */
-    char *phone;                            /* OPTIONAL */
-} Z_ContactInfo;
-
-typedef struct Z_NetworkAddressIA
-{
-    char *hostAddress;
-    int *port;
-} Z_NetworkAddressIA;
-
-typedef struct Z_NetworkAddressOPA
-{
-    char *pSel;
-    char *sSel;                  /* OPTIONAL */
-    char *tSel;                  /* OPTIONAL */
-    char *nSap;
-} Z_NetworkAddressOPA;
-
-typedef struct Z_NetworkAddressOther
-{
-    char *type;
-    char *address;
-} Z_NetworkAddressOther;
-
-typedef struct Z_NetworkAddress
-{
-    int which;
-#define Z_NetworkAddress_iA 0
-#define Z_NetworkAddress_oPA 1
-#define Z_NetworkAddress_other 2
-    union
-    {
-       Z_NetworkAddressIA *internetAddress;
-       Z_NetworkAddressOPA *osiPresentationAddress;
-       Z_NetworkAddressOther *other;
-    } u;
-} Z_NetworkAddress;
-
-typedef struct Z_PrivateCapOperator
-{
-    char *roperator;
-    Z_HumanString *description;             /* OPTIONAL */
-} Z_PrivateCapOperator;
-    
-typedef struct Z_SearchKey
-{
-    char *searchKey;
-    Z_HumanString *description;             /* OPTIONAL */
-} Z_SearchKey;
-
-typedef struct Z_PrivateCapabilities
-{
-    int num_operators;
-    Z_PrivateCapOperator **operators;      /* OPTIONAL */
-    int num_searchKeys;
-    Z_SearchKey **searchKeys;               /* OPTIONAL */
-    int num_description;
-    Z_HumanString **description;            /* OPTIONAL */
-} Z_PrivateCapabilities;
-
-typedef struct Z_ProxSupportPrivate
-{
-    int *unit;
-    Z_HumanString *description;             /* OPTIONAL */
-} Z_ProxSupportPrivate;
-
-typedef struct Z_ProxSupportUnit
-{
-    int which;
-#define Z_ProxSupportUnit_known 0
-#define Z_ProxSupportUnit_private 1
-    union
-    {
-       int *known;
-       Z_ProxSupportPrivate *zprivate;
-    } u;
-} Z_ProxSupportUnit;
-
-typedef struct Z_ProximitySupport
-{
-    bool_t *anySupport;
-    int num_unitsSupported;
-    Z_ProxSupportUnit **unitsSupported;     /* OPTIONAL */
-} Z_ProximitySupport;
-
-typedef struct Z_RpnCapabilities
-{
-    int num_operators;
-    int **operators;                        /* OPTIONAL */
-    bool_t *resultSetAsOperandSupported;
-    bool_t *restrictionOperandSupported;
-    Z_ProximitySupport *proximity;          /* OPTIONAL */
-} Z_RpnCapabilities;
-
-typedef struct Z_Iso8777Capabilities
-{
-    int num_searchKeys;
-    Z_SearchKey **searchKeys;
-    Z_HumanString *restrictions;            /* OPTIONAL */
-} Z_Iso8777Capabilities;
-
-typedef struct Z_QueryTypeDetails
-{
-    int which;
-#define Z_QueryTypeDetails_private 0
-#define Z_QueryTypeDetails_rpn 1
-#define Z_QueryTypeDetails_iso8777 2
-#define Z_QueryTypeDetails_z39_58 3
-#define Z_QueryTypeDetails_erpn 4
-#define Z_QueryTypeDetails_rankedList 5
-    union
-    {
-       Z_PrivateCapabilities *zprivate;
-       Z_RpnCapabilities *rpn;
-       Z_Iso8777Capabilities *iso8777;
-       Z_HumanString *z3958;
-       Z_RpnCapabilities *erpn;
-       Z_HumanString *rankedList;
-    } u;
-} Z_QueryTypeDetails;
-
-typedef struct Z_AccessRestrictionsUnit
-{
-    int *accessType;
-#define Z_AccessRestrictionsUnit_any                 0
-#define Z_AccessRestrictionsUnit_search              1
-#define Z_AccessRestrictionsUnit_present             2
-#define Z_AccessRestrictionsUnit_specific_elements   3
-#define Z_AccessRestrictionsUnit_extended_services   4
-#define Z_AccessRestrictionsUnit_by_database         5
-    Z_HumanString *accessText;              /* OPTIONAL */
-    int num_accessChallenges;
-    Odr_oid **accessChallenges;             /* OPTIONAL */
-} Z_AccessRestrictionsUnit;
-
-typedef struct Z_AccessRestrictions
-{
-    int num;
-    Z_AccessRestrictionsUnit **elements;
-} Z_AccessRestrictions;
-
-typedef struct Z_Charge
-{
-    Z_IntUnit *cost;
-    Z_Unit *perWhat;                        /* OPTIONAL */
-    Z_HumanString *text;                    /* OPTIONAL */
-} Z_Charge;
-
-typedef struct Z_CostsOtherCharge
-{
-    Z_HumanString *forWhat;
-    Z_Charge *charge;
-} Z_CostsOtherCharge;
-
-typedef struct Z_Costs
-{
-    Z_Charge *connectCharge;                /* OPTIONAL */
-    Z_Charge *connectTime;                  /* OPTIONAL */
-    Z_Charge *displayCharge;                /* OPTIONAL */
-    Z_Charge *searchCharge;                 /* OPTIONAL */
-    Z_Charge *subscriptCharge;              /* OPTIONAL */
-    int num_otherCharges;
-    Z_CostsOtherCharge **otherCharges;      /* OPTIONAL */
-} Z_Costs;
-
-typedef struct Z_AccessInfo
-{
-    int num_queryTypesSupported;
-    Z_QueryTypeDetails **queryTypesSupported;  /* OPTIONAL */
-    int num_diagnosticsSets;
-    Odr_oid **diagnosticsSets;              /* OPTIONAL */
-    int num_attributeSetIds;
-    Odr_oid **attributeSetIds;     /* OPTIONAL */
-    int num_schemas;
-    Odr_oid **schemas;                      /* OPTIONAL */
-    int num_recordSyntaxes;
-    Odr_oid **recordSyntaxes;               /* OPTIONAL */
-    int num_resourceChallenges;
-    Odr_oid **resourceChallenges;           /* OPTIONAL */
-    Z_AccessRestrictions *restrictedAccess;  /* OPTIONAL */
-    Z_Costs *costInfo;                      /* OPTIONAL */
-    int num_variantSets;
-    Odr_oid **variantSets;                  /* OPTIONAL */
-    int num_elementSetNames;
-    char **elementSetNames;     /* OPTIONAL */
-    int num_unitSystems;
-    char **unitSystems;                     /* OPTIONAL */
-} Z_AccessInfo;
-
-typedef struct Z_DatabaseList
-{
-    int num_databases;
-    Z_DatabaseName **databases;
-} Z_DatabaseList;
-
-typedef struct Z_AttributeValueList
-{
-    int num_attributes;
-    Z_StringOrNumeric **attributes;
-} Z_AttributeValueList;
-
-typedef struct Z_AttributeOccurrence
-{
-    Odr_oid *attributeSet;         /* OPTIONAL */
-    int *attributeType;
-    Odr_null *mustBeSupplied;               /* OPTIONAL */
-    int which;
-#define Z_AttributeOcc_any_or_none 0
-#define Z_AttributeOcc_specific 1
-    union
-    {
-       Odr_null *any_or_none;
-       Z_AttributeValueList *specific;
-    } attributeValues;
-} Z_AttributeOccurrence;
-
-typedef struct Z_AttributeCombination
-{
-    int num_occurrences;
-    Z_AttributeOccurrence **occurrences;
-} Z_AttributeCombination;
-
-typedef struct Z_AttributeCombinations
-{
-    Odr_oid *defaultAttributeSet;
-    int num_legalCombinations;
-    Z_AttributeCombination **legalCombinations;
-} Z_AttributeCombinations;
-
-typedef struct Z_AttributeValue
-{
-    Z_StringOrNumeric *value;
-    Z_HumanString *description;             /* OPTIONAL */
-    int num_subAttributes;
-    Z_StringOrNumeric **subAttributes;      /* OPTIONAL */
-    int num_superAttributes;
-    Z_StringOrNumeric **superAttributes;    /* OPTIONAL */
-    Odr_null *partialSupport;               /* OPTIONAL */
-} Z_AttributeValue;
-
-typedef struct Z_TargetInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * key elements
-     */
-    char *name;
-    /*
-     * non-key brief elements
-     */
-    Z_HumanString *recentNews;             /* OPTIONAL */
-    Z_IconObject *icon;                     /* OPTIONAL */
-    bool_t *namedResultSets;
-    bool_t *multipleDBsearch;
-    int *maxResultSets;                     /* OPTIONAL */
-    int *maxResultSize;                     /* OPTIONAL */
-    int *maxTerms;                          /* OPTIONAL */
-    Z_IntUnit *timeoutInterval;             /* OPTIONAL */
-    Z_HumanString *welcomeMessage;          /* OPTIONAL */
-    /*
-     * non-brief elements
-     */
-    Z_ContactInfo *contactInfo;             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    int num_nicknames;
-    char **nicknames;
-    Z_HumanString *usageRest;              /* OPTIONAL */
-    Z_HumanString *paymentAddr;             /* OPTIONAL */
-    Z_HumanString *hours;                   /* OPTIONAL */
-    int num_dbCombinations;
-    Z_DatabaseList **dbCombinations;        /* OPTIONAL */
-    int num_addresses;
-    Z_NetworkAddress **addresses;           /* OPTIONAL */
-    int num_languages;
-    char **languages;                       /* OPTIONAL */
-
-    Z_AccessInfo *commonAccessInfo;         /* OPTIONAL */
-} Z_TargetInfo;
-
-typedef struct Z_DatabaseInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Z_DatabaseName *name;
-    /* 
-     * Non-key elements.
-     */
-    Odr_null *explainDatabase;              /* OPTIONAL */
-    int num_nicknames;
-    Z_DatabaseName **nicknames;             /* OPTIONAL */
-    Z_IconObject *icon;                     /* OPTIONAL */
-    bool_t *userFee;
-    bool_t *available;
-    Z_HumanString *titleString;             /* OPTIONAL */
-    /*
-     * Non-brief elements.
-     */
-    int num_keywords;
-    Z_HumanString **keywords;               /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_DatabaseList *associatedDbs;          /* OPTIONAL */
-    Z_DatabaseList *subDbs;                 /* OPTIONAL */
-    Z_HumanString *disclaimers;             /* OPTIONAL */
-    Z_HumanString *news;                    /* OPTIONAL */
-
-#if 1
-    int which;
-    union {
-       int *actualNumber;
-       int *approxNumber;
-#define Z_DatabaseInfo_actualNumber 1
-#define Z_DatabaseInfo_approxNumber 2
-    } u; /* OPT */
-
-#else
-    int recordCount_which;
-#define Z_DatabaseInfo_actualNumber 0
-#define Z_DatabaseInfo_approxNumber 1
-    int *recordCount;                       /* OPTIONAL */
-#endif
-    Z_HumanString *defaultOrder;            /* OPTIONAL */
-    int *avRecordSize;                      /* OPTIONAL */
-    int *maxRecordSize;                     /* OPTIONAL */
-    Z_HumanString *hours;                   /* OPTIONAL */
-    Z_HumanString *bestTime;                /* OPTIONAL */
-    char *lastUpdate;          /* OPTIONAL */
-    Z_IntUnit *updateInterval;              /* OPTIONAL */
-    Z_HumanString *coverage;                /* OPTIONAL */
-    bool_t *proprietary;                    /* OPTIONAL */
-    Z_HumanString *copyrightText;           /* OPTIONAL */
-    Z_HumanString *copyrightNotice;         /* OPTIONAL */
-    Z_ContactInfo *producerContactInfo;     /* OPTIONAL */
-    Z_ContactInfo *supplierContactInfo;     /* OPTIONAL */
-    Z_ContactInfo *submissionContactInfo;   /* OPTIONAL */
-    Z_AccessInfo *accessInfo;               /* OPTIONAL */
-} Z_DatabaseInfo;
-
-typedef struct Z_TagTypeMapping
-{
-    int *tagType;
-    Odr_oid *tagSet;                        /* OPTIONAL */
-    Odr_null *defaultTagType;               /* OPTIONAL */
-} Z_TagTypeMapping;
-
-typedef struct Z_PathUnit
-{
-    int *tagType;
-    Z_StringOrNumeric *tagValue;
-} Z_PathUnit;
-
-typedef struct Z_Path
-{
-    int num;
-    Z_PathUnit **list;
-} Z_Path;
-
-struct Z_ElementDataType;
-typedef struct Z_ElementDataType Z_ElementDataType;
-
-typedef struct Z_ElementInfo
-{
-    char *elementName;
-    Z_Path *elementTagPath;
-    Z_ElementDataType *dataType;            /* OPTIONAL */
-    bool_t *required;
-    bool_t *repeatable;
-    Z_HumanString *description;             /* OPTIONAL */
-} Z_ElementInfo;
-
-typedef struct Z_ElementInfoList
-{
-    int num;
-    Z_ElementInfo **list;
-} Z_ElementInfoList;
-
-struct Z_ElementDataType
-{
-    int which;
-#define Z_ElementDataType_primitive 0
-#define Z_ElementDataType_structured 1
-    union
-    {
-       int *primitive;
-#define Z_PrimitiveDataType_octetString         0
-#define Z_PrimitiveDataType_numeric             1
-#define Z_PrimitiveDataType_date                2
-#define Z_PrimitiveDataType_external            3
-#define Z_PrimitiveDataType_string              4
-#define Z_PrimitiveDataType_trueOrFalse         5
-#define Z_PrimitiveDataType_oid                 6
-#define Z_PrimitiveDataType_intUnit             7
-#define Z_PrimitiveDataType_empty               8
-#define Z_PrimitiveDataType_noneOfTheAbove      100
-       Z_ElementInfoList *structured;
-    } u;
-};
-
-typedef struct Z_TagSetInfoElements
-{
-    char *elementname;
-    int num_nicknames;
-    char **nicknames;                       /* OPTIONAL */
-    Z_StringOrNumeric *elementTag;
-    Z_HumanString *description;             /* OPTIONAL */
-    int *dataType;                          /* OPTIONAL */
-    /* (value as in Z_PrimitiveElement) */
-    Z_OtherInformation *otherTagInfo;       /* OPTIONAL */
-} Z_TagSetInfoElements;
-
-typedef struct Z_SchemaInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Odr_oid *schema;
-    /*
-     * Non-key elements
-     */
-    char *name;
-    /*
-     * Non-brief elements
-     */
-    Z_HumanString *description;             /* OPTIONAL */
-    int num_tagTypeMapping;
-    Z_TagTypeMapping **tagTypeMapping;      /* OPTIONAL */
-    int num_recordStructure;
-    Z_ElementInfo **recordStructure;        /* OPTIONAL */
-} Z_SchemaInfo;
-
-
-typedef struct Z_TagSetInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Odr_oid *tagSet;
-    /*
-     * Non-key elements
-     */
-    char *name;
-    /*
-     * Non-brief elements
-     */
-    Z_HumanString *description;             /* OPTIONAL */
-    int num_elements;
-    Z_TagSetInfoElements **elements;        /* OPTIONAL */
-} Z_TagSetInfo;
-
-typedef struct Z_RecordSyntaxInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Odr_oid *recordSyntax;
-    /*
-     * Non-key elements
-     */
-    char *name;
-    /*
-     * Non-brief elements
-     */
-    int num_transferSyntaxes;
-    Odr_oid **transferSyntaxes;             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    char *asn1Module;                       /* OPTIONAL */
-    int num_abstractStructure;
-    Z_ElementInfo **abstractStructure;      /* OPTIONAL */
-} Z_RecordSyntaxInfo;
-
-typedef struct Z_AttributeDescription
-{
-    char *name;                             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_StringOrNumeric *attributeValue;
-    int num_equivalentAttributes;
-    Z_StringOrNumeric **equivalentAttributes; /* OPTIONAL */
-} Z_AttributeDescription;
-
-typedef struct Z_AttributeType
-{
-    char *name;                             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    int *attributeType;
-    int num_attributeValues;
-    Z_AttributeDescription **attributeValues;
-} Z_AttributeType;
-
-typedef struct Z_AttributeSetInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Odr_oid *attributeSet;
-    /*
-     * Non-key elements
-     */
-    char *name;
-    /*
-     * Non-brief elements
-     */
-    int num_attributes;
-    Z_AttributeType **attributes;           /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-} Z_AttributeSetInfo;
-
-typedef struct Z_TermListElement
-{
-    char *name;
-    Z_HumanString *title;                   /* OPTIONAL */
-    int *searchCost;                        /* OPTIONAL */
-#define Z_TermListElement_optimized           0
-#define Z_TermListElement_normal              1
-#define Z_TermListElement_expensive           2
-#define Z_TermListElement_filter              3
-    bool_t *scanable;
-    int num_broader;
-    char **broader;                         /* OPTIONAL */
-    int num_narrower;
-    char **narrower;                        /* OPTIONAL */
-} Z_TermListElement;
-
-typedef struct Z_TermListInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Z_DatabaseName *databaseName;
-    /*
-     * Non-key elements
-     */
-    int num_termLists;
-    Z_TermListElement **termLists;
-} Z_TermListInfo;
-
-typedef struct Z_ExtendedServicesInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Odr_oid *type;
-    /*
-     * Non-key elements
-     */
-    char *name;                             /* OPTIONAL */
-    bool_t *privateType;
-    bool_t *restrictionsApply;
-    bool_t *feeApply;
-    bool_t *available;
-    bool_t *retentionSupported;
-    int *waitAction;
-#define Z_ExtendedServicesInfo_waitSupported       1
-#define Z_ExtendedServicesInfo_waitAlways          2
-#define Z_ExtendedServicesInfo_waitNotSupported    3
-#define Z_ExtendedServicesInfo_depends             4
-#define Z_ExtendedServicesInfo_notSaying           5
-    /*
-     * Non-brief elements
-     */
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_External *specificExplain;          /* OPTIONAL */
-    char *esASN;                            /* OPTIONAL */
-} Z_ExtendedServicesInfo;
-
-typedef struct Z_OmittedAttributeInterpretation
-{
-    Z_StringOrNumeric *defaultValue;        /* OPTIONAL */
-    Z_HumanString *defaultDescription;      /* OPTIONAL */
-} Z_OmittedAttributeInterpretation;
-
-typedef struct Z_AttributeTypeDetails
-{
-    int *attributeType;
-    Z_OmittedAttributeInterpretation *defaultIfOmitted;  /* OPTIONAL */
-    int num_attributeValues;
-    Z_AttributeValue **attributeValues;     /* OPTIONAL */
-} Z_AttributeTypeDetails;
-
-typedef struct Z_AttributeSetDetails
-{
-    Odr_oid *attributeSet;
-    int num_attributesByType;
-    Z_AttributeTypeDetails **attributesByType;
-} Z_AttributeSetDetails;
-
-typedef struct Z_AttributeDetails
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key details
-     */
-    Z_DatabaseName *databaseName;
-    /*
-     * Non-brief elements
-     */
-    int num_attributesBySet;
-    Z_AttributeSetDetails **attributesBySet;  /* OPTIONAL */
-    Z_AttributeCombinations *attributeCombinations;  /* OPTIONAL */
-} Z_AttributeDetails;
-
-typedef struct Z_EScanInfo
-{
-    int *maxStepSize;                       /* OPTIONAL */
-    Z_HumanString *collatingSequence;       /* OPTIONAL */
-    bool_t *increasing;                     /* OPTIONAL */
-} Z_EScanInfo;
-
-typedef struct Z_TermListDetails
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    char *termListName;
-    /*
-     * Non-brief elements
-     */
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_AttributeCombinations *attributes;    /* OPTIONAL */
-    Z_EScanInfo *scanInfo;                  /* OPTIONAL */
-    int *estNumberTerms;                    /* OPTIONAL */
-    int num_sampleTerms;
-    Z_Term **sampleTerms;                   /* OPTIONAL */
-} Z_TermListDetails;
-
-typedef struct Z_RecordTag
-{
-    Z_StringOrNumeric *qualifier;           /* OPTIONAL */
-    Z_StringOrNumeric *tagValue;
-} Z_RecordTag;
-
-typedef struct Z_PerElementDetails
-{
-    char *name;                             /* OPTIONAL */
-    Z_RecordTag *recordTag;                 /* OPTIONAL */
-    int num_schemaTags;
-    Z_Path **schemaTags;                    /* OPTIONAL */
-    int *maxSize;                           /* OPTIONAL */
-    int *minSize;                           /* OPTIONAL */
-    int *avgSize;                           /* OPTIONAL */
-    int *fixedSize;                         /* OPTIONAL */
-    bool_t *repeatable;
-    bool_t *required;
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_HumanString *contents;                /* OPTIONAL */
-    Z_HumanString *billingInfo;             /* OPTIONAL */
-    Z_HumanString *restrictions;            /* OPTIONAL */
-    int num_alternateNames;
-    char **alternateNames;                  /* OPTIONAL */
-    int num_genericNames;
-    char **genericNames;                    /* OPTIONAL */
-    Z_AttributeCombinations *searchAccess;  /* OPTIONAL */
-} Z_PerElementDetails;
-
-typedef struct Z_ElementSetDetails
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Z_DatabaseName *databaseName;
-    char *elementSetName;
-    Odr_oid *recordSyntax;
-    /*
-     * Brief elements
-     */
-    Odr_oid *schema;
-    /*
-     * Non-brief elements
-     */
-    Z_HumanString *description;             /* OPTIONAL */
-    int num_detailsPerElement;
-    Z_PerElementDetails **detailsPerElement;  /* OPTIONAL */
-} Z_ElementSetDetails;
-
-typedef struct Z_RetrievalRecordDetails
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Z_DatabaseName *databaseName;
-    Odr_oid *schema;
-    Odr_oid *recordSyntax;
-    /*
-     * Non-brief elements
-     */
-    Z_HumanString *description;             /* OPTIONAL */
-    int num_detailsPerElement;
-    Z_PerElementDetails **detailsPerElement;  /* OPTIONAL */
-} Z_RetrievalRecordDetails;
-
-typedef struct Z_SortKeyDetails
-{
-    Z_HumanString *description;                        /* OPTIONAL */
-    int num_elementSpecifications;
-    Z_Specification **elementSpecifications;           /* OPTIONAL */
-    Z_AttributeCombinations *attributeSpecifications;  /* OPTIONAL */
-    int which;
-#define Z_SortKeyDetails_character 0
-#define Z_SortKeyDetails_numeric 1
-#define Z_SortKeyDetails_structured 2
-    union
-    {
-       Odr_null *character;
-       Odr_null *numeric;
-       Z_HumanString *structured;
-    } u;
-    int *caseSensitivity;                              /* OPTIONAL */
-#define Z_SortKeyDetails_always              0
-#define Z_SortKeyDetails_never               1
-#define Z_SortKeyDetails_default_yes         2
-#define Z_SortKeyDetails_default_no          3
-} Z_SortKeyDetails;
-
-typedef struct Z_SortDetails
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Z_DatabaseName *databaseName;
-    /* 
-     * Non-brief elements
-     */
-    int num_sortKeys;
-    Z_SortKeyDetails **sortKeys;            /* OPTIONAL */
-} Z_SortDetails;
-
-typedef struct Z_ProcessingInformation
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Z_DatabaseName *databaseName;
-    int *processingContext;
-#define Z_ProcessingInformation_access               0
-#define Z_ProcessingInformation_search               1
-#define Z_ProcessingInformation_retrieval            2
-#define Z_ProcessingInformation_record_presentation  3
-#define Z_ProcessingInformation_record_handling      4
-    char *name;
-    Odr_oid *oid;
-    /*
-     * Non-brief elements
-     */
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_External *instructions;             /* OPTIONAL */
-} Z_ProcessingInformation;
-
-typedef struct Z_ValueDescription
-{
-    int which;
-#define Z_ValueDescription_integer 0
-#define Z_ValueDescription_string 1
-#define Z_ValueDescription_octets 2
-#define Z_ValueDescription_oid 3
-#define Z_ValueDescription_unit 4
-#define Z_ValueDescription_valueAndUnit 5
-    union
-    {
-       int *integer;
-       char *string;
-       Odr_oct *octets;
-       Odr_oid *oid;
-       Z_Unit *unit;
-       Z_IntUnit *valueAndUnit;
-    } u;
-} Z_ValueDescription;
-
-typedef struct Z_ValueRange
-{
-    Z_ValueDescription *lower;              /* OPTIONAL */
-    Z_ValueDescription *upper;              /* OPTIONAL */
-} Z_ValueRange;
-
-typedef struct Z_ValueSetEnumerated
-{
-    int num;
-    Z_ValueDescription **elements;
-} Z_ValueSetEnumerated;
-
-typedef struct Z_ValueSet
-{
-    int which;
-#define Z_ValueSet_range 0
-#define Z_ValueSet_enumerated 1
-    union
-    {
-       Z_ValueRange *range;
-       Z_ValueSetEnumerated *enumerated;
-    } u;
-} Z_ValueSet;
-
-typedef struct Z_VariantValue
-{
-    int *dataType;
-    Z_ValueSet *values;                     /* OPTIONAL */
-} Z_VariantValue;
-
-typedef struct Z_VariantType
-{
-    char *name;                             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    int *variantType;
-    Z_VariantValue *variantValue;           /* OPTIONAL */
-} Z_VariantType;
-
-typedef struct Z_VariantClass
-{
-    char *name;                             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    int *variantClass;
-    int num_variantTypes;
-    Z_VariantType **variantTypes;
-} Z_VariantClass;
-
-typedef struct Z_VariantSetInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    Odr_oid *variantSet;
-    /*
-     * Brief elements
-     */
-    char *name;
-    /*
-     * Non-brief elements
-     */
-    int num_variants;
-    Z_VariantClass **variants;              /* OPTIONAL */
-} Z_VariantSetInfo;
-
-typedef struct Z_Units
-{
-    char *name;                             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_StringOrNumeric *unit;
-} Z_Units;
-
-typedef struct Z_UnitType
-{
-    char *name;                             /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    Z_StringOrNumeric *unitType;
-    int num_units;
-    Z_Units **units;
-} Z_UnitType;
-
-typedef struct Z_UnitInfo
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    /*
-     * Key elements
-     */
-    char *unitSystem;
-    /*
-     * Non-brief elements
-     */
-    Z_HumanString *description;             /* OPTIONAL */
-    int num_units;
-    Z_UnitType **units;                     /* OPTIONAL */
-} Z_UnitInfo;
-
-typedef struct Z_CategoryInfo
-{
-    char *category;
-    char *originalCategory;                 /* OPTIONAL */
-    Z_HumanString *description;             /* OPTIONAL */
-    char *asn1Module;                       /* OPTIONAL */
-} Z_CategoryInfo;
-
-typedef struct Z_CategoryList
-{
-    Z_CommonInfo *commonInfo;               /* OPTIONAL */
-    int num_categories;
-    Z_CategoryInfo **categories;
-} Z_CategoryList;
-
-typedef struct Z_ExplainRecord
-{
-    int which;
-#define Z_Explain_targetInfo 0
-#define Z_Explain_databaseInfo 1
-#define Z_Explain_schemaInfo 2
-#define Z_Explain_tagSetInfo 3
-#define Z_Explain_recordSyntaxInfo 4
-#define Z_Explain_attributeSetInfo 5
-#define Z_Explain_termListInfo 6
-#define Z_Explain_extendedServicesInfo 7
-#define Z_Explain_attributeDetails 8
-#define Z_Explain_termListDetails 9
-#define Z_Explain_elementSetDetails 10
-#define Z_Explain_retrievalRecordDetails 11
-#define Z_Explain_sortDetails 12
-#define Z_Explain_processing 13
-#define Z_Explain_variants 14
-#define Z_Explain_units 15
-#define Z_Explain_categoryList 16
-    union
-    {
-       Z_TargetInfo *targetInfo;
-       Z_DatabaseInfo *databaseInfo;
-       Z_SchemaInfo *schemaInfo;
-       Z_TagSetInfo *tagSetInfo;
-       Z_RecordSyntaxInfo *recordSyntaxInfo;
-       Z_AttributeSetInfo *attributeSetInfo;
-       Z_TermListInfo *termListInfo;
-       Z_ExtendedServicesInfo *extendedServicesInfo;
-       Z_AttributeDetails *attributeDetails;
-       Z_TermListDetails *termListDetails;
-       Z_ElementSetDetails *elementSetDetails;
-       Z_RetrievalRecordDetails *retrievalRecordDetails;
-       Z_SortDetails *sortDetails;
-       Z_ProcessingInformation *processing;
-       Z_VariantSetInfo *variants;
-       Z_UnitInfo *units;
-       Z_CategoryList *categoryList;
-    } u;
-} Z_ExplainRecord;
-
-YAZ_EXPORT int z_ExplainRecord(ODR o, Z_ExplainRecord **p, int opt,
-                              const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-ext.h b/include/prt-ext.h
deleted file mode 100644 (file)
index 7ae8da2..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-/*
- * Biased-choice External for Z39.50.
- */
-
-#ifndef PRT_EXT_H
-#define PRT_EXT_H
-
-#include <yconfig.h>
-#include <oid.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Used to keep track of known External definitions (a loose approach
- * to DEFINED_BY).
- */
-
-typedef struct Z_ext_typeent
-{
-    oid_value dref;    /* the direct-reference OID value. */
-    int what;          /* discriminator value for the external CHOICE */
-    Odr_fun fun;       /* decoder function */
-} Z_ext_typeent;
-
-struct Z_External
-{
-    Odr_oid *direct_reference;
-    int *indirect_reference;
-    char *descriptor;
-    int which;
-/* Generic types */
-#define Z_External_single 0
-#define Z_External_octet 1
-#define Z_External_arbitrary 2
-/* Specific types */
-#define Z_External_sutrs 3
-#define Z_External_explainRecord 4
-#define Z_External_resourceReport1 5
-#define Z_External_resourceReport2 6
-#define Z_External_promptObject1 7
-#define Z_External_grs1 8
-#define Z_External_extendedService 9
-#define Z_External_itemOrder 10
-#define Z_External_diag1 11
-#define Z_External_espec1 12
-#define Z_External_summary 13
-#define Z_External_OPAC 14
-#define Z_External_searchResult1 15
-#define Z_External_update 16
-#define Z_External_dateTime 17
-#define Z_External_universeReport 18
-    union
-    {
-       /* Generic types */
-       Odr_any *single_ASN1_type;
-       Odr_oct *octet_aligned;
-       Odr_bitmask *arbitrary;
-
-       /* Specific types */
-       Z_SUTRS *sutrs;
-       Z_ExplainRecord *explainRecord;
-       Z_ResourceReport1 *resourceReport1;
-       Z_ResourceReport2 *resourceReport2;
-       Z_PromptObject1 *promptObject1;
-       Z_GenericRecord *grs1;
-       Z_TaskPackage *extendedService;
-       Z_ItemOrder *itemOrder;
-       Z_DiagnosticFormat *diag1;
-       Z_Espec1 *espec1;
-       Z_BriefBib *summary;
-       Z_SearchInfoReport *searchResult1;
-       Z_IUUpdate *update;
-       Z_DateTime *dateTime;
-    Z_UniverseReport *universeReport;
-    } u;
-};
-
-YAZ_EXPORT int z_External(ODR o, Z_External **p, int opt, const char *name);
-YAZ_EXPORT Z_ext_typeent *z_ext_getentbyref(oid_value val);
-YAZ_EXPORT Z_External *z_ext_record(ODR o, int format, const char *buf,
-                                   int len);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-grs.h b/include/prt-grs.h
deleted file mode 100644 (file)
index fa40996..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_GRS_H
-#define PRT_GRS_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct Z_GenericRecord;
-typedef struct Z_GenericRecord Z_GenericRecord;
-
-typedef struct Z_ElementData
-{
-    int which;
-#define Z_ElementData_octets 0
-#define Z_ElementData_numeric 1
-#define Z_ElementData_date 2
-#define Z_ElementData_ext 3
-#define Z_ElementData_string 4
-#define Z_ElementData_trueOrFalse 5
-#define Z_ElementData_oid 6
-#define Z_ElementData_intUnit 7
-#define Z_ElementData_elementNotThere 8
-#define Z_ElementData_elementEmpty 9
-#define Z_ElementData_noDataRequested 10
-#define Z_ElementData_diagnostic 11
-#define Z_ElementData_subtree 12
-    union
-    {
-       Odr_oct *octets;                      
-       int *numeric;                         
-       char *date;             
-       Z_External *ext;                     
-       char *string;                         
-       bool_t *trueOrFalse;                  
-       Odr_oid *oid;                         
-       Z_IntUnit *intUnit;                  
-       Odr_null *elementNotThere;            
-       Odr_null *elementEmpty;               
-       Odr_null *noDataRequested;            
-       Z_External *diagnostic;              
-       Z_GenericRecord *subtree;            
-    } u;
-} Z_ElementData;
-
-typedef struct Z_Order
-{
-    bool_t *ascending;                    
-    int *order;                           
-} Z_Order;
-
-typedef struct Z_Usage
-{
-    int *type;                            
-#define Z_Usage_redistributable     1
-#define Z_Usage_restricted          2
-#define Z_Usage_licensePointer      3
-    char *restriction;                      /* OPTIONAL */
-} Z_Usage;
-
-typedef struct Z_HitVector
-{
-    Z_Term *satisfier;                      /* OPTIONAL */
-    Z_IntUnit *offsetIntoElement;           /* OPTIONAL */
-    Z_IntUnit *length;                      /* OPTIONAL */
-    int *hitRank;                           /* OPTIONAL */
-    Odr_oct *targetToken;                   /* OPTIONAL */
-} Z_HitVector;
-
-typedef struct Z_Triple
-{
-    Odr_oid *variantSetId;                  /* OPTIONAL */
-    int *zclass;
-    int *type;
-    int which;
-#define Z_Triple_integer 0
-#define Z_Triple_internationalString 1
-#define Z_Triple_octetString 2
-#define Z_Triple_oid 3
-#define Z_Triple_boolean 4
-#define Z_Triple_null 5
-#define Z_Triple_unit 6
-#define Z_Triple_valueAndUnit 7
-    union
-    {
-       int *integer;
-       char *internationalString;
-       Odr_oct *octetString;
-       Odr_oid *oid;
-       bool_t *zboolean;
-       Odr_null *null;
-       Z_Unit *unit;
-       Z_IntUnit *valueAndUnit;
-    } value;
-} Z_Triple;
-
-typedef struct Z_Variant
-{
-    Odr_oid *globalVariantSetId;            /* OPTIONAL */
-    int num_triples;
-    Z_Triple **triples;
-} Z_Variant;
-
-typedef struct Z_TagUnit
-{
-    int *tagType;                           /* OPTIONAL */
-    Z_StringOrNumeric *tagValue;         
-    int *tagOccurrence;                     /* OPTIONAL */
-} Z_TagUnit;
-
-typedef struct Z_TagPath
-{
-    int num_tags;
-    Z_TagUnit **tags;
-} Z_TagPath;
-
-typedef struct Z_ElementMetaData
-{
-    Z_Order *seriesOrder;                   /* OPTIONAL */
-    Z_Usage *usageRight;                    /* OPTIONAL */
-    int num_hits;
-    Z_HitVector **hits;                     /* OPTIONAL */
-    char *displayName;                      /* OPTIONAL */
-    int num_supportedVariants;
-    Z_Variant **supportedVariants;          /* OPTIONAL */
-    char *message;                          /* OPTIONAL */
-    Odr_oct *elementDescriptor;             /* OPTIONAL */
-    Z_TagPath *surrogateFor;                /* OPTIONAL */
-    Z_TagPath *surrogateElement;            /* OPTIONAL */
-    Z_External *other;                      /* OPTIONAL */
-} Z_ElementMetaData;
-
-typedef struct Z_TaggedElement
-{
-    int *tagType;                           /* OPTIONAL */
-    Z_StringOrNumeric *tagValue;         
-    int *tagOccurrence;                     /* OPTIONAL */
-    Z_ElementData *content;              
-    Z_ElementMetaData *metaData;            /* OPTIONAL */
-    Z_Variant *appliedVariant;              /* OPTIONAL */
-} Z_TaggedElement;
-
-struct Z_GenericRecord
-{
-    int num_elements;
-    Z_TaggedElement **elements;
-};
-
-YAZ_EXPORT int z_GenericRecord(ODR o, Z_GenericRecord **p, int opt,
-                              const char *name);
-YAZ_EXPORT int z_Variant(ODR o, Z_Variant **p, int opt,
-                        const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-proto.h b/include/prt-proto.h
deleted file mode 100644 (file)
index 4e42310..0000000
+++ /dev/null
@@ -1,1169 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Id: prt-proto.h,v 1.1 1999-06-08 13:11:55 adam Exp $
- */
-
-#ifndef PRT_PROTO_H
-#define PRT_PROTO_H
-
-#include <yconfig.h>
-#include <odr.h>
-#include <oid.h>
-#include <odr_use.h>
-#include <yaz-version.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
-
-struct Z_External;
-typedef struct Z_External Z_External;
-
-typedef Odr_oct Z_ReferenceId;
-typedef char Z_DatabaseName;
-typedef char Z_ResultSetId;
-typedef Odr_oct Z_ResultsetId;
-
-typedef struct Z_InfoCategory
-{
-    Odr_oid *categoryTypeId;         /* OPTIONAL */
-    int *categoryValue;
-} Z_InfoCategory;
-
-typedef struct Z_OtherInformationUnit
-{
-    Z_InfoCategory *category;        /* OPTIONAL */
-    int which;
-#define Z_OtherInfo_characterInfo 0
-#define Z_OtherInfo_binaryInfo 1
-#define Z_OtherInfo_externallyDefinedInfo 2
-#define Z_OtherInfo_oid 3
-    union
-    {
-       char *characterInfo; 
-       Odr_oct *binaryInfo;
-       Z_External *externallyDefinedInfo;
-       Odr_oid *oid;
-    } information;
-} Z_OtherInformationUnit;
-
-typedef struct Z_OtherInformation
-{
-    int num_elements;
-    Z_OtherInformationUnit **list;
-} Z_OtherInformation;
-
-typedef struct Z_StringOrNumeric
-{
-    int which;
-#define Z_StringOrNumeric_string 0
-#define Z_StringOrNumeric_numeric 1
-    union
-    {
-       char *string;
-       int *numeric;
-    } u;
-} Z_StringOrNumeric;
-
-typedef struct Z_Unit
-{
-    char *unitSystem;               /* OPTIONAL */
-    Z_StringOrNumeric *unitType;    /* OPTIONAL */
-    Z_StringOrNumeric *unit;        /* OPTIONAL */
-    int *scaleFactor;               /* OPTIONAL */
-} Z_Unit;
-
-typedef struct Z_IntUnit
-{
-    int *value;
-    Z_Unit *unitUsed;
-} Z_IntUnit;
-
-typedef Odr_oct Z_SUTRS;
-
-typedef struct Z_StringList
-{
-    int num_strings;
-    char **strings;
-} Z_StringList;
-
-/* ----------------- INIT SERVICE  ----------------*/
-
-typedef struct
-{
-    char *groupId;       /* OPTIONAL */
-    char *userId;         /* OPTIONAL */
-    char *password;      /* OPTIONAL */
-} Z_IdPass;
-
-typedef struct Z_IdAuthentication
-{
-    int which;
-#define Z_IdAuthentication_open 0
-#define Z_IdAuthentication_idPass 1
-#define Z_IdAuthentication_anonymous 2
-#define Z_IdAuthentication_other 3
-    union
-    {
-       char *open;
-       Z_IdPass *idPass;
-       Odr_null *anonymous;
-       Z_External *other;
-    } u;
-} Z_IdAuthentication;
-
-#define Z_ProtocolVersion_1               0
-#define Z_ProtocolVersion_2               1
-#define Z_ProtocolVersion_3               2
-
-#define Z_Options_search                  0
-#define Z_Options_present                 1
-#define Z_Options_delSet                  2
-#define Z_Options_resourceReport          3
-#define Z_Options_triggerResourceCtrl     4
-#define Z_Options_resourceCtrl            5
-#define Z_Options_accessCtrl              6
-#define Z_Options_scan                    7
-#define Z_Options_sort                    8
-#define Z_Options_reserved                9
-#define Z_Options_extendedServices       10
-#define Z_Options_level_1Segmentation    11
-#define Z_Options_level_2Segmentation    12
-#define Z_Options_concurrentOperations   13
-#define Z_Options_namedResultSets        14
-
-typedef struct Z_InitRequest
-{
-    Z_ReferenceId *referenceId;                   /* OPTIONAL */
-    Odr_bitmask *protocolVersion;
-    Odr_bitmask *options;
-    int *preferredMessageSize;
-    int *maximumRecordSize;
-    Z_IdAuthentication* idAuthentication;        /* OPTIONAL */
-    char *implementationId;                      /* OPTIONAL */
-    char *implementationName;                    /* OPTIONAL */
-    char *implementationVersion;                 /* OPTIONAL */
-    Z_External *userInformationField;            /* OPTIONAL */
-    Z_OtherInformation *otherInfo;               /* OPTIONAL */
-} Z_InitRequest;
-
-typedef struct Z_InitResponse
-{
-    Z_ReferenceId *referenceId;    /* OPTIONAL */
-    Odr_bitmask *protocolVersion;
-    Odr_bitmask *options;
-    int *preferredMessageSize;
-    int *maximumRecordSize;
-    bool_t *result;
-    char *implementationId;      /* OPTIONAL */
-    char *implementationName;    /* OPTIONAL */
-    char *implementationVersion; /* OPTIONAL */
-    Z_External *userInformationField; /* OPTIONAL */
-    Z_OtherInformation *otherInfo;    /* OPTIONAL */
-} Z_InitResponse;
-
-typedef struct Z_NSRAuthentication
-{
-    char *user;
-    char *password;
-    char *account;
-} Z_NSRAuthentication;
-
-int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt,
-                       const char *name);
-
-int z_StrAuthentication(ODR o, char **p, int opt, const char *name);
-
-/* ------------------ SEARCH SERVICE ----------------*/
-
-typedef struct Z_DatabaseSpecificUnit
-{
-    char *databaseName;
-    char *elementSetName;
-} Z_DatabaseSpecificUnit;
-
-typedef struct Z_DatabaseSpecific
-{
-    int num_elements;
-    Z_DatabaseSpecificUnit **elements;
-} Z_DatabaseSpecific;
-
-typedef struct Z_ElementSetNames
-{
-    int which;
-#define Z_ElementSetNames_generic 0
-#define Z_ElementSetNames_databaseSpecific 1
-    union
-    {
-        char *generic;
-        Z_DatabaseSpecific *databaseSpecific;
-    } u;
-} Z_ElementSetNames;
-
-/* ---------------------- RPN QUERY --------------------------- */
-
-typedef struct Z_ComplexAttribute
-{
-    int num_list;
-    Z_StringOrNumeric **list;
-    int num_semanticAction;
-    int **semanticAction;           /* OPTIONAL */
-} Z_ComplexAttribute;
-
-typedef struct Z_AttributeElement
-{
-    Odr_oid *attributeSet;           /* OPTIONAL - v3 only */
-    int *attributeType;
-    int which;
-#define Z_AttributeValue_numeric 0
-#define Z_AttributeValue_complex 1
-    union
-    {
-       int *numeric;
-       Z_ComplexAttribute *complex;
-    } value;
-} Z_AttributeElement;
-
-typedef struct Z_Term 
-{
-    int which;
-#define Z_Term_general 0
-#define Z_Term_numeric 1
-#define Z_Term_characterString 2
-#define Z_Term_oid 3
-#define Z_Term_dateTime 4
-#define Z_Term_external 5
-#define Z_Term_integerAndUnit 6
-#define Z_Term_null 7
-    union
-    {
-       Odr_oct *general; /* this is required for v2 */
-       int *numeric;
-       char *characterString;
-       Odr_oid *oid;
-       char *dateTime;
-       Z_External *external;
-       /* Z_IntUnit *integerAndUnit; */
-       Odr_null *null;
-    } u;
-} Z_Term;
-
-typedef struct Z_AttributesPlusTerm
-{
-    int num_attributes;
-    Z_AttributeElement **attributeList;
-    Z_Term *term;
-} Z_AttributesPlusTerm;
-
-typedef struct Z_ResultSetPlusAttributes
-{
-    char *resultSet;
-    int num_attributes;
-    Z_AttributeElement **attributeList;
-} Z_ResultSetPlusAttributes;
-
-typedef struct Z_ProximityOperator
-{
-    bool_t *exclusion;          /* OPTIONAL */
-    int *distance;
-    bool_t *ordered;
-    int *relationType;
-#define Z_Prox_lessThan           1
-#define Z_Prox_lessThanOrEqual    2
-#define Z_Prox_equal              3
-#define Z_Prox_greaterThanOrEqual 4
-#define Z_Prox_greaterThan        5
-#define Z_Prox_notEqual           6
-    int which;
-#define Z_ProxCode_known 0
-#define Z_ProxCode_private 1
-    int *proximityUnitCode;
-#define Z_ProxUnit_character       1
-#define Z_ProxUnit_word            2
-#define Z_ProxUnit_sentence        3
-#define Z_ProxUnit_paragraph       4
-#define Z_ProxUnit_section         5
-#define Z_ProxUnit_chapter         6
-#define Z_ProxUnit_document        7
-#define Z_ProxUnit_element         8
-#define Z_ProxUnit_subelement      9
-#define Z_ProxUnit_elementType    10
-#define Z_ProxUnit_byte           11   /* v3 only */
-} Z_ProximityOperator;
-
-typedef struct Z_Operator
-{
-    int which;
-#define Z_Operator_and 0
-#define Z_Operator_or 1
-#define Z_Operator_and_not 2
-#define Z_Operator_prox 3
-    union
-    {
-       Odr_null *and;          /* these guys are nulls. */
-       Odr_null *or;
-       Odr_null *and_not;
-       Z_ProximityOperator *prox;
-    } u;
-} Z_Operator;
-
-typedef struct Z_Operand
-{
-    int which;
-#define Z_Operand_APT 0
-#define Z_Operand_resultSetId 1
-#define Z_Operand_resultAttr             /* v3 only */ 2
-    union
-    {
-       Z_AttributesPlusTerm *attributesPlusTerm;
-       Z_ResultSetId *resultSetId;
-       Z_ResultSetPlusAttributes *resultAttr;
-    } u;
-} Z_Operand;
-
-typedef struct Z_Complex
-{
-    struct Z_RPNStructure *s1;
-    struct Z_RPNStructure *s2;
-    Z_Operator *roperator;
-} Z_Complex;
-
-typedef struct Z_RPNStructure
-{
-    int which;
-#define Z_RPNStructure_simple 0
-#define Z_RPNStructure_complex 1
-    union
-    {
-       Z_Operand *simple;
-       Z_Complex *complex;
-    } u;
-} Z_RPNStructure;
-
-typedef struct Z_RPNQuery
-{
-    Odr_oid *attributeSetId;
-    Z_RPNStructure *RPNStructure;
-} Z_RPNQuery;
-
-/* -------------------------- SEARCHREQUEST -------------------------- */
-
-typedef struct Z_Query
-{
-    int which;
-#define Z_Query_type_1 1
-#define Z_Query_type_2 2
-#define Z_Query_type_101 3
-    union
-    {
-       Z_RPNQuery *type_1;
-       Odr_oct *type_2;
-       Z_RPNQuery *type_101;
-    } u;
-} Z_Query;
-
-typedef struct Z_SearchRequest
-{
-    Z_ReferenceId *referenceId;   /* OPTIONAL */
-    int *smallSetUpperBound;
-    int *largeSetLowerBound;
-    int *mediumSetPresentNumber;
-    bool_t *replaceIndicator;
-    char *resultSetName;
-    int num_databaseNames;
-    char **databaseNames;
-    Z_ElementSetNames *smallSetElementSetNames;    /* OPTIONAL */
-    Z_ElementSetNames *mediumSetElementSetNames;    /* OPTIONAL */
-    Odr_oid *preferredRecordSyntax;  /* OPTIONAL */
-    Z_Query *query;
-    Z_OtherInformation *additionalSearchInfo;       /* OPTIONAL */
-    Z_OtherInformation *otherInfo;                  /* OPTIONAL */
-} Z_SearchRequest;
-
-/* ------------------------ RECORD -------------------------- */
-
-typedef Z_External Z_DatabaseRecord;
-
-typedef struct Z_DefaultDiagFormat
-{
-    Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
-    int *condition;
-    /* until the whole character set issue becomes more definite,
-     * you can probably ignore this on input. */
-    int which;
-#define Z_DiagForm_v2AddInfo 0
-#define Z_DiagForm_v3AddInfo 1
-    char *addinfo;
-} Z_DefaultDiagFormat;
-
-typedef struct Z_DiagRec
-{
-    int which;
-#define Z_DiagRec_defaultFormat 0
-#define Z_DiagRec_externallyDefined 1
-    union
-    {
-       Z_DefaultDiagFormat *defaultFormat;
-       Z_External *externallyDefined;
-    } u;
-} Z_DiagRec;
-
-typedef struct Z_DiagRecs
-{
-    int num_diagRecs;
-    Z_DiagRec **diagRecs;
-} Z_DiagRecs;
-
-typedef struct Z_NamePlusRecord
-{
-    char *databaseName;      /* OPTIONAL */
-    int which;
-#define Z_NamePlusRecord_databaseRecord 0
-#define Z_NamePlusRecord_surrogateDiagnostic 1
-    union
-    {
-       Z_DatabaseRecord *databaseRecord;
-       Z_DiagRec *surrogateDiagnostic;
-    } u;
-} Z_NamePlusRecord;
-
-typedef struct Z_NamePlusRecordList
-{
-    int num_records;
-    Z_NamePlusRecord **records;
-} Z_NamePlusRecordList;
-
-typedef struct Z_Records
-{
-    int which;
-#define Z_Records_DBOSD 0
-#define Z_Records_NSD 1
-#define Z_Records_multipleNSD 2
-    union
-    {
-       Z_NamePlusRecordList *databaseOrSurDiagnostics;
-       Z_DiagRec *nonSurrogateDiagnostic;
-       Z_DiagRecs *multipleNonSurDiagnostics;
-    } u;
-} Z_Records;
-
-/* ------------------------ SEARCHRESPONSE ------------------ */
-
-typedef struct Z_SearchResponse
-{
-    Z_ReferenceId *referenceId;       /* OPTIONAL */
-    int *resultCount;
-    int *numberOfRecordsReturned;
-    int *nextResultSetPosition;
-    bool_t *searchStatus;
-    int *resultSetStatus;              /* OPTIONAL */
-#define Z_RES_SUBSET        1
-#define Z_RES_INTERIM       2
-#define Z_RES_NONE          3
-    int *presentStatus;                /* OPTIONAL */
-#define Z_PRES_SUCCESS      0
-#define Z_PRES_PARTIAL_1    1
-#define Z_PRES_PARTIAL_2    2
-#define Z_PRES_PARTIAL_3    3
-#define Z_PRES_PARTIAL_4    4
-#define Z_PRES_FAILURE      5
-    Z_Records *records;                  /* OPTIONAL */
-    Z_OtherInformation *additionalSearchInfo;
-    Z_OtherInformation *otherInfo;
-} Z_SearchResponse;
-
-/* ------------------------- PRESENT SERVICE -----------------*/
-
-typedef struct Z_ElementSpec
-{
-    int which;
-#define Z_ElementSpec_elementSetName 0
-#define Z_ElementSpec_externalSpec 1
-    union
-    {
-       char *elementSetName;
-       Z_External *externalSpec;
-    } u;
-} Z_ElementSpec;
-
-typedef struct Z_Specification
-{
-    Odr_oid *schema;                  /* OPTIONAL */
-    Z_ElementSpec *elementSpec;       /* OPTIONAL */
-} Z_Specification;
-
-typedef struct Z_DbSpecific
-{
-    char *databaseName;
-    Z_Specification *spec;
-} Z_DbSpecific;
-
-typedef struct Z_CompSpec
-{
-    bool_t *selectAlternativeSyntax;
-    Z_Specification *generic;            /* OPTIONAL */
-    int num_dbSpecific;
-    Z_DbSpecific **dbSpecific;           /* OPTIONAL */
-    int num_recordSyntax;
-    Odr_oid **recordSyntax;              /* OPTIONAL */
-} Z_CompSpec;
-
-typedef struct Z_RecordComposition
-{
-    int which;
-#define Z_RecordComp_simple 0
-#define Z_RecordComp_complex 1
-    union
-    {
-       Z_ElementSetNames *simple;
-       Z_CompSpec *complex;
-    } u;
-} Z_RecordComposition;
-
-typedef struct Z_Range
-{
-    int *startingPosition;
-    int *numberOfRecords;
-} Z_Range;
-
-typedef struct Z_PresentRequest
-{
-    Z_ReferenceId *referenceId;              /* OPTIONAL */
-    Z_ResultSetId *resultSetId;
-    int *resultSetStartPoint;
-    int *numberOfRecordsRequested;
-    int num_ranges;
-    Z_Range **additionalRanges;              /* OPTIONAL */
-    Z_RecordComposition *recordComposition;  /* OPTIONAL */
-    Odr_oid *preferredRecordSyntax;  /* OPTIONAL */
-    int *maxSegmentCount;                 /* OPTIONAL */
-    int *maxRecordSize;                   /* OPTIONAL */
-    int *maxSegmentSize;                  /* OPTIONAL */
-    Z_OtherInformation *otherInfo;        /* OPTIONAL */
-} Z_PresentRequest;
-
-typedef struct Z_PresentResponse
-{
-    Z_ReferenceId *referenceId;        /* OPTIONAL */
-    int *numberOfRecordsReturned;
-    int *nextResultSetPosition;
-    int *presentStatus;
-    Z_Records *records;
-    Z_OtherInformation *otherInfo;     /* OPTIONAL */
-} Z_PresentResponse;
-
-/* ------------------ RESOURCE CONTROL ----------------*/
-
-typedef struct Z_TriggerResourceControlRequest
-{
-    Z_ReferenceId *referenceId;    /* OPTIONAL */
-    int *requestedAction;
-#define Z_TriggerResourceCtrl_resourceReport  1
-#define Z_TriggerResourceCtrl_resourceControl 2
-#define Z_TriggerResourceCtrl_cancel          3
-    Odr_oid *prefResourceReportFormat;  /* OPTIONAL */
-    bool_t *resultSetWanted;            /* OPTIONAL */
-    Z_OtherInformation *otherInfo;
-} Z_TriggerResourceControlRequest;
-
-typedef struct Z_ResourceControlRequest
-{
-    Z_ReferenceId *referenceId;    /* OPTIONAL */
-    bool_t *suspendedFlag;         /* OPTIONAL */
-    Z_External *resourceReport; /* OPTIONAL */
-    int *partialResultsAvailable;  /* OPTIONAL */
-#define Z_ResourceControlRequest_subset    1
-#define Z_ResourceControlRequest_interim   2
-#define Z_ResourceControlRequest_none      3
-    bool_t *responseRequired;
-    bool_t *triggeredRequestFlag;  /* OPTIONAL */
-    Z_OtherInformation *otherInfo;
-} Z_ResourceControlRequest;
-
-typedef struct Z_ResourceControlResponse
-{
-    Z_ReferenceId *referenceId;    /* OPTIONAL */
-    bool_t *continueFlag;
-    bool_t *resultSetWanted;       /* OPTIONAL */
-    Z_OtherInformation *otherInfo;
-} Z_ResourceControlResponse;
-
-
-/* ------------------ ACCESS CTRL SERVICE ----------------*/
-
-typedef struct Z_AccessControlRequest
-{
-    Z_ReferenceId *referenceId;           /* OPTIONAL */
-    int which;
-#define Z_AccessRequest_simpleForm 0
-#define Z_AccessRequest_externallyDefined 1
-    union
-    {
-       Odr_oct *simpleForm;
-       Z_External *externallyDefined;
-    } u;
-    Z_OtherInformation *otherInfo;           /* OPTIONAL */
-} Z_AccessControlRequest;
-
-typedef struct Z_AccessControlResponse
-{
-    Z_ReferenceId *referenceId;              /* OPTIONAL */
-    int which;
-#define Z_AccessResponse_simpleForm 0
-#define Z_AccessResponse_externallyDefined 1
-    union
-    {
-       Odr_oct *simpleForm;
-       Z_External *externallyDefined;
-    } u;
-    Z_DiagRec *diagnostic;                   /* OPTIONAL */
-    Z_OtherInformation *otherInfo;           /* OPTIONAL */
-} Z_AccessControlResponse;
-
-/* ------------------------ SCAN SERVICE -------------------- */
-
-typedef struct Z_AttributeList
-{
-    int num_attributes;
-    Z_AttributeElement **attributes;
-} Z_AttributeList;
-
-typedef struct Z_AlternativeTerm
-{
-    int num_terms;
-    Z_AttributesPlusTerm **terms;
-} Z_AlternativeTerm;
-
-typedef struct Z_ByDatabase
-{
-    char *db;
-    int *num;                           /* OPTIONAL */
-    Z_OtherInformation *otherDbInfo;    /* OPTIONAL */
-} Z_ByDatabase;
-
-typedef struct Z_ByDatabaseList
-{
-    int num_elements;
-    Z_ByDatabase **elements;
-} Z_ByDatabaseList;
-
-typedef struct Z_ScanOccurrences
-{
-    int which;
-#define Z_ScanOccurrences_global         0
-#define Z_ScanOccurrences_byDatabase     1
-    union
-    {
-       int *global;
-       Z_ByDatabaseList *byDatabase;
-    } u;
-
-} Z_ScanOccurrences;
-
-typedef struct Z_OccurrenceByAttributesElem
-{
-    Z_AttributeList *attributes;
-    Z_ScanOccurrences *occurrences;         /* OPTIONAL */
-    Z_OtherInformation *otherOccurInfo;      /* OPTIONAL */
-} Z_OccurrenceByAttributesElem;
-
-typedef struct Z_OccurrenceByAttributes
-{
-    int num_elements;
-    Z_OccurrenceByAttributesElem **elements;
-} Z_OccurrenceByAttributes;
-
-typedef struct Z_TermInfo
-{
-    Z_Term *term;
-    char *displayTerm;                     /* OPTIONAL */
-    Z_AttributeList *suggestedAttributes;  /* OPTIONAL */
-    Z_AlternativeTerm *alternativeTerm;    /* OPTIONAL */
-    int *globalOccurrences;                /* OPTIONAL */
-    Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
-    Z_OtherInformation *otherTermInfo;      /* OPTIONAL */
-} Z_TermInfo;
-
-typedef struct Z_Entry
-{
-    int which;
-#define Z_Entry_termInfo 0
-#define Z_Entry_surrogateDiagnostic 1
-    union
-    {
-       Z_TermInfo *termInfo;
-       Z_DiagRec *surrogateDiagnostic;
-    } u;
-} Z_Entry;
-
-#ifdef BUGGY_LISTENTRIES
-
-typedef struct Z_Entries
-{
-    int num_entries;
-    Z_Entry **entries;
-} Z_Entries;
-
-typedef struct Z_ListEntries
-{
-    int which;
-#define Z_ListEntries_entries 0
-#define Z_ListEntries_nonSurrogateDiagnostics 1
-    union
-    {
-       Z_Entries *entries;
-       Z_DiagRecs *nonSurrogateDiagnostics;
-    } u;
-} Z_ListEntries;
-
-#endif
-
-typedef struct Z_ListEntries {
-       int num_entries;
-       Z_Entry **entries; /* OPT */
-       int num_nonsurrogateDiagnostics;
-       Z_DiagRec **nonsurrogateDiagnostics; /* OPT */
-} Z_ListEntries;
-
-typedef struct Z_ScanRequest
-{
-    Z_ReferenceId *referenceId;       /* OPTIONAL */
-    int num_databaseNames;
-    char **databaseNames;
-    Odr_oid *attributeSet;          /* OPTIONAL */
-    Z_AttributesPlusTerm *termListAndStartPoint;
-    int *stepSize;                    /* OPTIONAL */
-    int *numberOfTermsRequested;
-    int *preferredPositionInResponse;   /* OPTIONAL */
-    Z_OtherInformation *otherInfo;
-} Z_ScanRequest;
-
-typedef struct Z_ScanResponse
-{
-    Z_ReferenceId *referenceId;       /* OPTIONAL */
-    int *stepSize;                    /* OPTIONAL */
-    int *scanStatus;
-#define Z_Scan_success      0
-#define Z_Scan_partial_1    1
-#define Z_Scan_partial_2    2
-#define Z_Scan_partial_3    3
-#define Z_Scan_partial_4    4
-#define Z_Scan_partial_5    5
-#define Z_Scan_failure      6
-    int *numberOfEntriesReturned;
-    int *positionOfTerm;              /* OPTIONAL */
-    Z_ListEntries *entries;           /* OPTIONAL */
-    Odr_oid *attributeSet;            /* OPTIONAL */
-    Z_OtherInformation *otherInfo;
-} Z_ScanResponse; 
-
-
-/* ------------------------ DELETE -------------------------- */
-
-#define Z_DeleteStatus_success                          0
-#define Z_DeleteStatus_resultSetDidNotExist             1
-#define Z_DeleteStatus_previouslyDeletedByTarget        2
-#define Z_DeleteStatus_systemProblemAtTarget            3
-#define Z_DeleteStatus_accessNotAllowed                 4
-#define Z_DeleteStatus_resourceControlAtOrigin          5
-#define Z_DeleteStatus_resourceControlAtTarget          6
-#define Z_DeleteStatus_bulkDeleteNotSupported           7
-#define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte  8
-#define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
-#define Z_DeleteStatus_resultSetInUse                  10
-
-typedef struct Z_ListStatus
-{
-    Z_ResultSetId *id;
-    int *status;
-} Z_ListStatus;
-
-typedef struct Z_DeleteResultSetRequest
-{
-    Z_ReferenceId *referenceId;        /* OPTIONAL */
-    int *deleteFunction;
-#define Z_DeleteRequest_list    0
-#define Z_DeleteRequest_all     1
-    int num_resultSetList;
-    Z_ResultSetId **resultSetList;      /* OPTIONAL */
-    Z_OtherInformation *otherInfo;
-} Z_DeleteResultSetRequest;
-
-typedef struct Z_ListStatuses {
-    int num;
-    Z_ListStatus **elements;
-} Z_ListStatuses;
-
-typedef struct Z_DeleteResultSetResponse
-{
-    Z_ReferenceId *referenceId;        /* OPTIONAL */
-    int *deleteOperationStatus;
-    Z_ListStatuses *deleteListStatuses;/* OPTIONAL */
-    int *numberNotDeleted;             /* OPTIONAL */
-    Z_ListStatuses *bulkStatuses;      /* OPTIONAL */
-    char *deleteMessage;               /* OPTIONAL */
-    Z_OtherInformation *otherInfo;
-} Z_DeleteResultSetResponse;
-
-/* ------------------------ CLOSE SERVICE ------------------- */
-
-typedef struct Z_Close
-{
-    Z_ReferenceId *referenceId;         /* OPTIONAL */
-    int *closeReason;
-#define Z_Close_finished           0
-#define Z_Close_shutdown           1
-#define Z_Close_systemProblem      2
-#define Z_Close_costLimit          3
-#define Z_Close_resources          4
-#define Z_Close_securityViolation  5
-#define Z_Close_protocolError      6
-#define Z_Close_lackOfActivity     7
-#define Z_Close_peerAbort          8
-#define Z_Close_unspecified        9
-    char *diagnosticInformation;          /* OPTIONAL */
-    Odr_oid *resourceReportFormat;        /* OPTIONAL */
-    Z_External *resourceReport;         /* OPTIONAL */
-    Z_OtherInformation *otherInfo;        /* OPTIONAL */
-} Z_Close;
-
-/* ------------------------ SEGMENTATION -------------------- */
-
-typedef struct Z_Segment
-{
-    Z_ReferenceId *referenceId;   /* OPTIONAL */
-    int *numberOfRecordsReturned;
-    int num_segmentRecords;
-    Z_NamePlusRecord **segmentRecords;
-    Z_OtherInformation *otherInfo;  /* OPTIONAL */
-} Z_Segment;
-
-/* ----------------------- Extended Services ---------------- */
-
-typedef struct Z_Permissions
-{
-    char *userId;                         
-    int num_allowableFunctions;
-    int **allowableFunctions;             
-#define Z_Permissions_delete              1
-#define Z_Permissions_modifyContents      2
-#define Z_Permissions_modifyPermissions   3
-#define Z_Permissions_present             4
-#define Z_Permissions_invoke              5
-} Z_Permissions;
-
-typedef struct Z_ExtendedServicesRequest
-{
-    Z_ReferenceId *referenceId;             /* OPTIONAL */
-    int *function;                        
-#define Z_ExtendedServicesRequest_create              1
-#define Z_ExtendedServicesRequest_delete              2
-#define Z_ExtendedServicesRequest_modify              3
-    Odr_oid *packageType;                 
-    char *packageName;                      /* OPTIONAL */
-    char *userId;                           /* OPTIONAL */
-    Z_IntUnit *retentionTime;               /* OPTIONAL */
-    Z_Permissions *permissions;             /* OPTIONAL */
-    char *description;                      /* OPTIONAL */
-    Z_External *taskSpecificParameters;     /* OPTIONAL */
-    int *waitAction;                      
-#define Z_ExtendedServicesRequest_wait                1
-#define Z_ExtendedServicesRequest_waitIfPossible      2
-#define Z_ExtendedServicesRequest_dontWait            3
-#define Z_ExtendedServicesRequest_dontReturnPackage   4
-    char *elements;             /* OPTIONAL */
-    Z_OtherInformation *otherInfo;          /* OPTIONAL */
-} Z_ExtendedServicesRequest;
-
-typedef struct Z_ExtendedServicesResponse
-{
-    Z_ReferenceId *referenceId;             /* OPTIONAL */
-    int *operationStatus;                 
-#define Z_ExtendedServicesResponse_done                1
-#define Z_ExtendedServicesResponse_accepted            2
-#define Z_ExtendedServicesResponse_failure             3
-    int num_diagnostics;
-    Z_DiagRec **diagnostics;                /* OPTIONAL */
-    Z_External *taskPackage;                /* OPTIONAL */
-    Z_OtherInformation *otherInfo;          /* OPTIONAL */
-} Z_ExtendedServicesResponse;
-
-/* ------------------------ Sort --------------------------- */
-
-typedef struct Z_SortAttributes
-{
-    Odr_oid *id;
-    Z_AttributeList *list;
-} Z_SortAttributes;
-
-typedef struct Z_SortKey
-{
-    int which;
-#define Z_SortKey_sortField             0
-#define Z_SortKey_elementSpec           1
-#define Z_SortKey_sortAttributes        2
-    union
-    {
-       char *sortField;
-       Z_Specification *elementSpec;
-       Z_SortAttributes *sortAttributes;
-    } u;
-} Z_SortKey;
-
-typedef struct Z_SortDbSpecific
-{
-    char *databaseName;
-    Z_SortKey *dbSort;
-} Z_SortDbSpecific;
-
-typedef struct Z_SortDbSpecificList
-{
-    int num_dbSpecific;
-    Z_SortDbSpecific **dbSpecific;
-} Z_SortDbSpecificList;
-
-typedef struct Z_SortElement
-{
-    int which;
-#define Z_SortElement_generic               0
-#define Z_SortElement_databaseSpecific      1
-    union
-    {
-       Z_SortKey *generic;
-       Z_SortDbSpecificList *databaseSpecific;
-    } u;
-} Z_SortElement;
-
-typedef struct Z_SortMissingValueAction
-{
-    int which;
-#define Z_SortMissingValAct_abort           0
-#define Z_SortMissingValAct_null            1
-#define Z_SortMissingValAct_valData         2
-    union
-    {
-       Odr_null *abort;
-       Odr_null *null;
-       Odr_oct *valData;
-    } u;
-} Z_SortMissingValueAction;
-
-typedef struct Z_SortKeySpec
-{
-    Z_SortElement *sortElement;
-    int *sortRelation;
-#define Z_SortRelation_ascending            0
-#define Z_SortRelation_descending           1
-#define Z_SortRelation_ascendingByFreq      3
-#define Z_SortRelation_descendingByFreq     4
-    int *caseSensitivity;
-#define Z_SortCase_caseSensitive            0
-#define Z_SortCase_caseInsensitive          1
-    Z_SortMissingValueAction *missingValueAction;  /* OPTIONAL */
-} Z_SortKeySpec;
-
-typedef struct Z_SortResponse
-{
-    Z_ReferenceId *referenceId;             /* OPTIONAL */
-    int *sortStatus;
-#define Z_SortStatus_success              0
-#define Z_SortStatus_partial_1            1
-#define Z_SortStatus_failure              2
-    int *resultSetStatus;                   /* OPTIONAL */
-#define Z_SortResultSetStatus_empty       1
-#define Z_SortResultSetStatus_interim     2
-#define Z_SortResultSetStatus_unchanged   3
-#define Z_SortResultSetStatus_none        4
-    Z_DiagRecs *diagnostics;                /* OPTIONAL */
-    Z_OtherInformation *otherInfo;          /* OPTIONAL */
-} Z_SortResponse;
-
-typedef struct Z_SortKeySpecList
-{
-    int num_specs;
-    Z_SortKeySpec **specs;
-} Z_SortKeySpecList;
-
-typedef struct Z_SortRequest
-{
-    Z_ReferenceId *referenceId;             /* OPTIONAL */
-    Z_StringList *inputResultSetNames;
-    char *sortedResultSetName;
-    Z_SortKeySpecList *sortSequence;
-    Z_OtherInformation *otherInfo;          /* OPTIONAL */
-} Z_SortRequest;
-
-/* ----------------------- Resource Report ------------------ */
-
-typedef struct Z_ResourceReportRequest
-{
-    Z_ReferenceId *referenceId;             /* OPTIONAL */
-    Z_ReferenceId *opId;                    /* OPTIONAL */
-    Odr_oid *prefResourceReportFormat;      /* OPTIONAL */
-    Z_OtherInformation *otherInfo;          /* OPTIONAL */
-} Z_ResourceReportRequest;
-
-typedef struct Z_ResourceReportResponse
-{
-    Z_ReferenceId *referenceId;             /* OPTIONAL */
-    int *resourceReportStatus;
-#define Z_ResourceReportStatus_success   0
-#define Z_ResourceReportStatus_partial   1
-#define Z_ResourceReportStatus_failure_1 2
-#define Z_ResourceReportStatus_failure_2 3
-#define Z_ResourceReportStatus_failure_3 4
-#define Z_ResourceReportStatus_failure_4 5
-#define Z_ResourceReportStatus_failure_5 6
-#define Z_ResourceReportStatus_failure_6 7
-    Z_External *resourceReport;             /* OPTIONAL */
-    Z_OtherInformation *otherInfo;          /* OPTIONAL */
-} Z_ResourceReportResponse;
-
-/* ------------------------ APDU ---------------------------- */
-
-typedef struct Z_APDU
-{    
-    int which;
-#define Z_APDU_initRequest 0
-#define Z_APDU_initResponse 1
-#define Z_APDU_searchRequest 2
-#define Z_APDU_searchResponse 3
-#define Z_APDU_presentRequest 4
-#define Z_APDU_presentResponse 5
-#define Z_APDU_deleteResultSetRequest 6
-#define Z_APDU_deleteResultSetResponse 7
-#define Z_APDU_resourceControlRequest 8
-#define Z_APDU_resourceControlResponse 9
-#define Z_APDU_triggerResourceControlRequest 10
-#define Z_APDU_scanRequest 11
-#define Z_APDU_scanResponse 12
-#define Z_APDU_segmentRequest 13
-#define Z_APDU_extendedServicesRequest 14
-#define Z_APDU_extendedServicesResponse 15
-#define Z_APDU_close 16
-#define Z_APDU_accessControlRequest 17
-#define Z_APDU_accessControlResponse 18
-#define Z_APDU_sortRequest 20
-#define Z_APDU_sortResponse 21
-#define Z_APDU_resourceReportRequest 22
-#define Z_APDU_resourceReportResponse 23
-    union
-    {
-       Z_InitRequest  *initRequest;
-       Z_InitResponse *initResponse;
-       Z_SearchRequest *searchRequest;
-       Z_SearchResponse *searchResponse;
-       Z_PresentRequest *presentRequest;
-       Z_PresentResponse *presentResponse;
-       Z_DeleteResultSetRequest *deleteResultSetRequest;
-       Z_DeleteResultSetResponse *deleteResultSetResponse;
-       Z_AccessControlRequest *accessControlRequest;
-       Z_AccessControlResponse *accessControlResponse;
-       Z_ResourceControlRequest *resourceControlRequest;
-       Z_ResourceControlResponse *resourceControlResponse;
-       Z_TriggerResourceControlRequest *triggerResourceControlRequest;
-       Z_ResourceReportRequest *resourceReportRequest;
-       Z_ResourceReportResponse *resourceReportResponse;
-       Z_ScanRequest *scanRequest;
-       Z_ScanResponse *scanResponse;
-       Z_SortRequest *sortRequest;
-       Z_SortResponse *sortResponse;
-       Z_Segment *segmentRequest;
-       Z_ExtendedServicesRequest *extendedServicesRequest;
-       Z_ExtendedServicesResponse *extendedServicesResponse;
-       Z_Close *close;
-    } u;
-} Z_APDU;
-
-#define z_APDU z_APDU_old
-
-YAZ_EXPORT int z_APDU(ODR o, Z_APDU **p, int opt, const char *name);
-YAZ_EXPORT int z_SUTRS(ODR o, Odr_oct **p, int opt, const char *name);
-
-YAZ_EXPORT Z_InitRequest *zget_InitRequest(ODR o);
-YAZ_EXPORT Z_InitResponse *zget_InitResponse(ODR o);
-YAZ_EXPORT Z_SearchRequest *zget_SearchRequest(ODR o);
-YAZ_EXPORT Z_SearchResponse *zget_SearchResponse(ODR o);
-YAZ_EXPORT Z_PresentRequest *zget_PresentRequest(ODR o);
-YAZ_EXPORT Z_PresentResponse *zget_PresentResponse(ODR o);
-YAZ_EXPORT Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
-YAZ_EXPORT Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
-YAZ_EXPORT Z_ScanRequest *zget_ScanRequest(ODR o);
-YAZ_EXPORT Z_ScanResponse *zget_ScanResponse(ODR o);
-YAZ_EXPORT Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
-YAZ_EXPORT Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
-YAZ_EXPORT Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
-YAZ_EXPORT Z_Close *zget_Close(ODR o);
-YAZ_EXPORT int z_StringList(ODR o, Z_StringList **p, int opt,
-                           const char *name);
-YAZ_EXPORT int z_InternationalString(ODR o, char **p, int opt,
-                                    const char *name);
-YAZ_EXPORT int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt,
-                                 const char *naem);
-YAZ_EXPORT int z_ElementSetName(ODR o, char **p, int opt, const char *name);
-YAZ_EXPORT int z_IntUnit(ODR o, Z_IntUnit **p, int opt, const char *name);
-YAZ_EXPORT int z_Unit(ODR o, Z_Unit **p, int opt, const char *name);
-YAZ_EXPORT int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt,
-                             const char *name);
-YAZ_EXPORT int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt,
-                                const char *name);
-YAZ_EXPORT int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p,
-                                     int opt, const char *name);
-YAZ_EXPORT int z_Term(ODR o, Z_Term **p, int opt, const char *name);
-YAZ_EXPORT int z_Specification(ODR o, Z_Specification **p, int opt,
-                              const char *name);
-YAZ_EXPORT int z_Permissions(ODR o, Z_Permissions **p, int opt,
-                            const char *name);
-YAZ_EXPORT int z_DiagRec(ODR o, Z_DiagRec **p, int opt, const char *name);
-YAZ_EXPORT int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt, const char *name);
-YAZ_EXPORT int z_AttributeList(ODR o, Z_AttributeList **p, int opt,
-                              const char *name);
-YAZ_EXPORT int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt,
-                                  const char *name);
-YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
-YAZ_EXPORT int z_Query(ODR o, Z_Query **p, int opt, const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <prt-rsc.h>
-#include <prt-acc.h>
-#include <prt-exp.h>
-#include <prt-grs.h>
-#include <prt-arc.h>
-#include <prt-exd.h>
-#include <prt-dia.h>
-#include <prt-esp.h>
-#include <prt-add.h>
-
-#include <prt-dat.h>
-#include <prt-univ.h>
-#include <prt-ext.h>
-
-#endif
diff --git a/include/prt-rsc.h b/include/prt-rsc.h
deleted file mode 100644 (file)
index 5bdf5c9..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: prt-rsc.h,v $
- * Revision 1.7  1999-04-20 09:56:48  adam
- * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
- * Modified all encoders/decoders to reflect this change.
- *
- * Revision 1.6  1997/05/14 06:53:50  adam
- * C++ support.
- *
- * Revision 1.5  1995/09/29 17:12:11  quinn
- * Smallish
- *
- * Revision 1.4  1995/09/27  15:02:52  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.3  1995/08/17  12:45:17  quinn
- * Fixed minor problems with GRS-1. Added support in c&s.
- *
- * Revision 1.2  1995/06/02  09:49:50  quinn
- * Add access control
- *
- * Revision 1.1  1995/06/01  11:24:52  quinn
- * Resource Control
- *
- *
- */
-
-#ifndef PRT_RSC_H
-#define PRT_RSC_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* -------------------- Resource-1 -------------------- */
-
-#define Z_EstimateType_currentSearchRecords           1
-#define Z_EstimateType_finalSearchRecords             2
-#define Z_EstimateType_currentPresentRecords          3
-#define Z_EstimateType_finalPresentRecords            4
-#define Z_EstimateType_currentOpTimeProcessing        5
-#define Z_EstimateType_finalOpTimeProcessing          6
-#define Z_EstimateType_currentAssocTime               7
-#define Z_EstimateType_currentOperationCost           8
-#define Z_EstimateType_finalOperationCost             9
-#define Z_EstimateType_currentAssocCost              10
-#define Z_EstimateType_finalOpTimeElapsed            11
-#define Z_EstimateType_percentComplete               12
-#define Z_EstimateType_currentSearchAssCost          13
-#define Z_EstimateType_currentPresentAssCost         14
-#define Z_EstimateType_currentConnectAssCost         15
-#define Z_EstimateType_currentOtherAssCost           16
-
-typedef struct Z_Estimate1
-{
-    int *type;
-    int *value;
-    int *currencyCode;             /* OPTIONAL */
-} Z_Estimate1;
-
-typedef struct Z_ResourceReport1
-{
-    int num_estimates;
-    Z_Estimate1 **estimates;
-    char *message;
-} Z_ResourceReport1;
-
-int z_ResourceReport1(ODR o, Z_ResourceReport1 **p, int opt, const char *name);
-
-/* -------------------- Resource-2 -------------------- */
-
-typedef struct Z_Estimate2
-{
-    Z_StringOrNumeric *type;      /* same as in estimate1, if numeric */
-    Z_IntUnit *value;
-} Z_Estimate2;
-
-typedef struct Z_ResourceReport2
-{
-    int num_estimates;
-    Z_Estimate2 **estimates;             /* OPTIONAL */
-    char *message;                       /* OPTIONAL */
-} Z_ResourceReport2;
-
-int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt, const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/prt-univ.h b/include/prt-univ.h
deleted file mode 100644 (file)
index d48c7fc..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1998
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- */
-
-#ifndef PRT_UNIV_H
-#define PRT_UNIV_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* YC 0.1: Fri Mar 20 14:28:54 CET 1998 */
-/* Module-H ResourceReport-Format-Universe-1 */
-
-typedef struct Z_UniverseReportHits Z_UniverseReportHits;
-int z_UniverseReportHits (ODR o, Z_UniverseReportHits **p, int opt,
-                         const char *name);
-
-typedef struct Z_UniverseReportDuplicate Z_UniverseReportDuplicate;
-int z_UniverseReportDuplicate (ODR o, Z_UniverseReportDuplicate **p, int opt,
-                              const char *name);
-
-typedef struct Z_UniverseReport Z_UniverseReport;
-int z_UniverseReport (ODR o, Z_UniverseReport **p, int opt,
-                     const char *name);
-
-struct Z_UniverseReportHits {
-       Z_StringOrNumeric *database;
-       Z_StringOrNumeric *hits;
-};
-
-struct Z_UniverseReportDuplicate {
-       Z_StringOrNumeric *hitno;
-};
-
-struct Z_UniverseReport {
-       int *totalHits;
-       int which;
-       union {
-               Z_UniverseReportHits *databaseHits;
-               Z_UniverseReportDuplicate *duplicate;
-#define Z_UniverseReport_databaseHits 1
-#define Z_UniverseReport_duplicate 2
-       } u;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/readconf.h b/include/readconf.h
deleted file mode 100644 (file)
index 405a820..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#ifndef READCONF_H
-#define READCONF_H
-
-#include <stdio.h>
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-YAZ_EXPORT int readconf(char *name, void *rprivate,
-                        int (*fun)(char *name, void *rprivate,
-                                  int argc, char *argv[]));
-
-YAZ_EXPORT int readconf_line(FILE *f, int *lineno,
-                            char *line, int len, char *argv[], int num);
-    
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/statserv.h b/include/statserv.h
deleted file mode 100644 (file)
index 7298ef7..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: statserv.h,v $
- * Revision 1.17  1999-07-06 12:17:15  adam
- * Added option -1 that runs server once (for profiling purposes).
- *
- * Revision 1.16  1999/06/10 11:45:30  adam
- * Added bend_start, bend_stop handlers and removed pre_init.
- * Handlers bend_start/bend_stop are called when service/daemon is
- * started/stopped.
- *
- * Revision 1.15  1999/04/16 14:45:55  adam
- * Added interface for tcpd wrapper for access control.
- *
- * Revision 1.14  1999/02/02 13:57:32  adam
- * Uses preprocessor define WIN32 instead of WINDOWS to build code
- * for Microsoft WIN32.
- *
- * Revision 1.13  1998/02/10 10:28:56  adam
- * Added app_name, service_dependencies, service_display_name and
- * options_func. options_func allows us to specify a different function
- * to interogate the command line arguments. The other members allow us
- * to pass the full service details accross to the service manager (CW).
- *
- * Revision 1.??? 1997/12/18   Chas
- * Added app_name, service_dependencies, service_display_name and 
- * options_func. options_func allows us to specify a different function 
- * to interogate the command line arguments. The other members allow us
- * to pass the full service details accross to the service manager.
- *
- * Revision 1.12  1997/11/07 13:31:47  adam
- * Added NT Service name part of statserv_options_block. Moved NT
- * service utility to server library.
- *
- * Revision 1.11  1997/10/27 14:03:01  adam
- * Added new member to statserver_options_block, pre_init, which
- * specifies a callback to be invoked after command line parsing and
- * before the server listens for the first time.
- *
- * Revision 1.10  1997/09/01 09:31:26  adam
- * Removed definition statserv_remove to eventl.h. (A hack really).
- *
- * Revision 1.9  1997/09/01 08:49:53  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.8  1997/05/14 06:53:51  adam
- * C++ support.
- *
- * Revision 1.7  1995/09/29 17:12:12  quinn
- * Smallish
- *
- * Revision 1.6  1995/09/27  15:02:53  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.5  1995/06/19  12:38:31  quinn
- * Reorganized include-files. Added small features.
- *
- * Revision 1.4  1995/06/15  07:45:08  quinn
- * Moving to v3.
- *
- * Revision 1.3  1995/05/16  08:50:38  quinn
- * License, documentation, and memory fixes
- *
- *
- */
-
-#ifndef STATSERVER_H
-#define STATSERVER_H
-
-#include <yconfig.h>
-#include <odr.h>
-#include <oid.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-typedef struct statserv_options_block
-{
-    int dynamic;                  /* fork on incoming requests */
-    int one_shot;                 /* one session then exit(1) */
-    int loglevel;                 /* desired logging-level */
-    char apdufile[ODR_MAXNAME+1]; /* file for pretty-printed PDUs */
-    char logfile[ODR_MAXNAME+1];  /* file for diagnostic output */
-    char default_listen[1024];    /* 0 == no default listen */
-    enum oid_proto default_proto; /* PROTO_SR or PROTO_Z3950 */
-    int idle_timeout;             /* how many minutes to wait before closing */
-    int maxrecordsize;            /* maximum value for negotiation */
-    char configname[ODR_MAXNAME+1];  /* given to the backend in bend_init */
-    char setuid[ODR_MAXNAME+1];     /* setuid to this user after binding */
-    void (*bend_start)(struct statserv_options_block *p);
-    void (*bend_stop)(struct statserv_options_block *p);
-    int (*options_func)(int argc, char **argv);
-    int (*check_ip)(void *cd, const char *addr, int len, int type);
-    char daemon_name[128];
-    int inetd;                    /* Do we use the inet deamon or not */
-    
-#ifdef WIN32
-    /* We only have these members for the windows version */
-    /* They seemed a bit large to have them there in general */
-    char service_name[128];         /* NT Service Name */
-    char app_name[128];             /* Application Name */
-    char service_dependencies[128]; /* The services we are dependent on */
-    char service_display_name[128]; /* The service display name */
-#endif /* WIN32 */
-} statserv_options_block;
-    
-int statserv_main(int argc, char **argv);
-int statserv_start(int argc, char **argv);
-void statserv_closedown(void);
-statserv_options_block *statserv_getcontrol(void);
-void statserv_setcontrol(statserv_options_block *block);
-
-int check_ip_tcpd(void *cd, const char *addr, int len, int type);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/tcpip.h b/include/tcpip.h
deleted file mode 100644 (file)
index a74c554..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: tcpip.h,v $
- * Revision 1.13  1999-06-16 11:55:24  adam
- * Added APDU log to client.
- *
- * Revision 1.12  1999/01/08 11:23:19  adam
- * Added const modifier to some of the BER/ODR encoding routines.
- *
- * Revision 1.11  1998/06/22 11:32:38  adam
- * Added 'conditional cs_listen' feature.
- *
- * Revision 1.10  1998/05/18 13:07:01  adam
- * Changed the way attribute sets are handled by the retriaval module.
- * Extended Explain conversion / schema.
- * Modified server and client to work with ASN.1 compiled protocol handlers.
- *
- * Revision 1.9  1997/09/01 08:49:54  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.8  1997/05/14 06:53:52  adam
- * C++ support.
- *
- * Revision 1.7  1996/07/06 19:58:32  quinn
- * System headerfiles gathered in yconfig
- *
- * Revision 1.6  1996/02/10  12:23:42  quinn
- * Enable inetd operations fro TCP/IP stack
- *
- * Revision 1.5  1995/09/29  17:12:13  quinn
- * Smallish
- *
- * Revision 1.4  1995/09/28  10:12:36  quinn
- * Windows-support changes
- *
- * Revision 1.3  1995/09/27  15:02:53  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.2  1995/05/16  08:50:39  quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.1  1995/03/30  09:39:43  quinn
- * Moved .h files to include directory
- *
- * Revision 1.3  1995/03/27  08:36:11  quinn
- * Some work on nonblocking operation in xmosi.c and rfct.c.
- * Added protocol parameter to cs_create()
- *
- * Revision 1.2  1995/03/14  10:28:43  quinn
- * Adding server-side support to tcpip.c and fixing bugs in nonblocking I/O
- *
- * Revision 1.1  1995/02/09  15:51:52  quinn
- * Works better now.
- *
- */
-
-#ifndef TCPIP_H
-#define TCPIP_H
-
-#include <comstack.h>
-#include <oid.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT int completeWAIS(const unsigned char *buf, int len);
-YAZ_EXPORT struct sockaddr_in *tcpip_strtoaddr(const char *str);
-YAZ_EXPORT COMSTACK tcpip_type(int s, int blocking, int protocol);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/tpath.h b/include/tpath.h
deleted file mode 100644 (file)
index 2c9b7c1..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995-1997, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: tpath.h,v $
- * Revision 1.4  1997-10-31 12:20:08  adam
- * Improved memory debugging for xmalloc/nmem.c. References to NMEM
- * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
- * Bug fix: missing fclose in data1_read_espec1.
- *
- */
-
-#ifndef TPATH_H
-#define TPATH_H
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT FILE *yaz_path_fopen(const char *path,
-                               const char *name, const char *mode);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/wrbuf.h b/include/wrbuf.h
deleted file mode 100644 (file)
index eb8ac7c..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1995-1997, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: wrbuf.h,v $
- * Revision 1.8  1999-11-03 09:05:56  adam
- * Implemented wrbuf_puts.
- *
- * Revision 1.7  1999/08/27 09:40:32  adam
- * Renamed logf function to yaz_log. Removed VC++ project files.
- *
- * Revision 1.6  1997/10/31 12:20:08  adam
- * Improved memory debugging for xmalloc/nmem.c. References to NMEM
- * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
- * Bug fix: missing fclose in data1_read_espec1.
- *
- * Revision 1.5  1997/09/17 12:10:32  adam
- * YAZ version 1.4.
- *
- */
-
-#ifndef WRBUF_H
-#define WRBUF_H
-
-#include <xmalloc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct wrbuf
-{
-    char *buf;
-    int pos;
-    int size;
-} wrbuf, *WRBUF;
-
-YAZ_EXPORT WRBUF wrbuf_alloc(void);
-YAZ_EXPORT void wrbuf_free(WRBUF b, int free_buf);
-YAZ_EXPORT void wrbuf_rewind(WRBUF b);
-YAZ_EXPORT int wrbuf_grow(WRBUF b, int minsize);
-YAZ_EXPORT int wrbuf_write(WRBUF b, const char *buf, int size);
-YAZ_EXPORT int wrbuf_puts(WRBUF b, const char *buf);
-
-#define wrbuf_len(b) ((b)->pos)
-#define wrbuf_buf(b) ((b)->buf)
-
-#define wrbuf_putc(b, c) \
-    (((b)->pos >= (b)->size ? wrbuf_grow(b, 1) : 0),  \
-    (b)->buf[(b)->pos++] = (c), 0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/xmalloc.h b/include/xmalloc.h
deleted file mode 100644 (file)
index ac77917..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 1995-1999, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The names of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: xmalloc.h,v $
- * Revision 1.6  1999-07-13 13:24:53  adam
- * Updated memory debugging memory allocatation routines.
- *
- * Revision 1.5  1998/07/20 12:36:22  adam
- * Minor changes.
- *
- * Revision 1.4  1997/10/31 12:20:08  adam
- * Improved memory debugging for xmalloc/nmem.c. References to NMEM
- * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
- * Bug fix: missing fclose in data1_read_espec1.
- *
- * Revision 1.3  1997/09/01 08:49:54  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.2  1997/05/14 06:53:53  adam
- * C++ support.
- *
- * Revision 1.1  1995/11/01 11:55:41  quinn
- * Added xmalloc.c
- *
- * Revision 1.8  1995/10/16  14:03:07  quinn
- * Changes to support element set names and espec1
- *
- * Revision 1.7  1994/10/05  10:15:18  quinn
- * Added xrealloc.
- *
- * Revision 1.6  1994/09/26  16:31:24  adam
- * Minor changes. xmalloc declares xcalloc now.
- *
- * Revision 1.5  1994/09/19  15:46:34  quinn
- * Added stdlib.h
- *
- * Revision 1.4  1994/08/18  08:22:27  adam
- * Res.h modified. xmalloc now declares xstrdup.
- *
- * Revision 1.3  1994/08/17  15:34:15  adam
- * Initial version of resource manager.
- *
- * Revision 1.2  1994/08/17  14:09:48  quinn
- * Small changes
- *
- * Revision 1.1  1994/08/17  13:39:07  adam
- * Added xmalloc header.
- *
- * Revision 1.1  1994/08/16  16:16:02  adam
- * bfile header created.
- *
- */
-
-#ifndef XMALLOC_H
-#define XMALLOC_H
-
-#include <sys/types.h>
-#include <stdlib.h>
-
-#include <yconfig.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define xrealloc(o, x) xrealloc_f(o, x, __FILE__, __LINE__)
-#define xmalloc(x) xmalloc_f(x, __FILE__, __LINE__)
-#define xcalloc(x,y) xcalloc_f(x,y, __FILE__, __LINE__)
-#define xfree(x) xfree_f(x, __FILE__, __LINE__)
-#define xstrdup(s) xstrdup_f(s, __FILE__, __LINE__)
-#define xmalloc_trav(s) xmalloc_trav_f(s, __FILE__, __LINE__)
-    
-YAZ_EXPORT void *xrealloc_f (void *o, size_t size, const char *file, int line);
-YAZ_EXPORT void *xmalloc_f (size_t size, const char *file, int line);
-YAZ_EXPORT void *xcalloc_f (size_t nmemb, size_t size,
-                           const char *file, int line);
-YAZ_EXPORT char *xstrdup_f (const char *p, const char *file, int line);
-YAZ_EXPORT void xfree_f (void *p, const char *file, int line);
-YAZ_EXPORT void xmalloc_trav_f(const char *s, const char *file, int line);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/xmosi.h b/include/xmosi.h
deleted file mode 100644 (file)
index 8d522d3..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: xmosi.h,v $
- * Revision 1.7  1999-06-16 11:55:24  adam
- * Added APDU log to client.
- *
- * Revision 1.6  1997/05/14 06:53:53  adam
- * C++ support.
- *
- * Revision 1.5  1996/02/10 12:23:43  quinn
- * Enable inetd operations fro TCP/IP stack
- *
- * Revision 1.4  1995/09/29  17:12:13  quinn
- * Smallish
- *
- * Revision 1.3  1995/09/27  15:02:53  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.2  1995/05/16  08:50:39  quinn
- * License, documentation, and memory fixes
- *
- * Revision 1.1  1995/03/30  09:39:43  quinn
- * Moved .h files to include directory
- *
- * Revision 1.3  1995/03/27  08:36:16  quinn
- * Some work on nonblocking operation in xmosi.c and rfct.c.
- * Added protocol parameter to cs_create()
- *
- * Revision 1.2  1995/03/14  10:28:48  quinn
- * Adding server-side support to tcpip.c and fixing bugs in nonblocking I/O
- *
- * Revision 1.1  1995/03/01  08:40:33  quinn
- * First working version of rfct. Addressing needs work.
- *
- */
-
-#ifndef XMOSI_H
-#define XMOSI_H
-
-#include <comstack.h>
-#include <stdio.h>
-#include <xti.h>
-#include <xti92.h>
-#include <xtiUser.h>
-#include <mosi.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct netbuf *mosi_strtoaddr(const char *str);
-
-COMSTACK mosi_type(int s, int blocking, int protocol);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/yaz-ccl.h b/include/yaz-ccl.h
deleted file mode 100644 (file)
index 9da4c37..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1995, Index Data.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation, in whole or in part, for any purpose, is hereby granted,
- * provided that:
- *
- * 1. This copyright and permission notice appear in all copies of the
- * software and its documentation. Notices of copyright or attribution
- * which appear at the beginning of any file must remain unchanged.
- *
- * 2. The name of Index Data or the individual authors may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
- * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- *
- * $Log: yaz-ccl.h,v $
- * Revision 1.8  1997-09-01 08:49:54  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.7  1997/06/23 10:30:45  adam
- * Added ODR stream as parameter to ccl_rpn_query and ccl_scan_query.
- *
- * Revision 1.6  1997/05/14 06:53:54  adam
- * C++ support.
- *
- * Revision 1.5  1995/09/29 17:12:14  quinn
- * Smallish
- *
- * Revision 1.4  1995/09/27  15:02:54  quinn
- * Modified function heads & prototypes.
- *
- * Revision 1.3  1995/05/16  08:50:40  quinn
- * License, documentation, and memory fixes
- *
- *
- */
-
-#ifndef YAZ_CCL_H
-#define YAZ_CCL_H
-
-#include <yconfig.h>
-#include <proto.h>
-#include <ccl.h>
-#include <odr.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT Z_RPNQuery *ccl_rpn_query (ODR o, struct ccl_rpn_node *p);
-YAZ_EXPORT Z_AttributesPlusTerm *ccl_scan_query (ODR o, struct ccl_rpn_node *p);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/yaz-util.h b/include/yaz-util.h
deleted file mode 100644 (file)
index c1224d2..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1995-1997, Index Data.
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: yaz-util.h,v $
- * Revision 1.6  1997-10-27 13:52:46  adam
- * Header yaz-util includes all YAZ utility header files.
- *
- * Revision 1.5  1997/09/04 07:58:36  adam
- * Added prototype for atoi_n.
- *
- * Revision 1.4  1997/09/01 08:49:54  adam
- * New windows NT/95 port using MSV5.0. To export DLL functions the
- * YAZ_EXPORT modifier was added. Defined in yconfig.h.
- *
- * Revision 1.3  1997/05/14 06:53:54  adam
- * C++ support.
- *
- * Revision 1.2  1996/02/20 17:58:09  adam
- * Added const to yaz_matchstr.
- *
- * Revision 1.1  1996/02/20  16:32:49  quinn
- * Created util file.
- */
-
-#ifndef YAZ_UTIL_H
-#define YAZ_UTIL_H
-
-#include <yconfig.h>
-
-#include <xmalloc.h>
-#include <log.h>
-#include <tpath.h>
-#include <options.h>
-#include <wrbuf.h>
-#include <nmem.h>
-#include <readconf.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-YAZ_EXPORT int yaz_matchstr(const char *s1, const char *s2);
-YAZ_EXPORT int atoi_n (const char *buf, int len);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/yaz-version.h b/include/yaz-version.h
deleted file mode 100644 (file)
index 2eb333d..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Current software version.
- *
- * $Log: yaz-version.h,v $
- * Revision 1.18  1998-06-26 11:17:23  quinn
- * v2+
- *
- * Revision 1.17  1998/01/30 15:32:57  adam
- * 1.4pl2.
- *
- * Revision 1.16  1998/01/29 13:28:23  adam
- * YAZ version 1.4pl1.
- *
- * Revision 1.15  1997/09/17 12:10:33  adam
- * YAZ version 1.4.
- *
- * Revision 1.14  1997/04/30 08:52:09  quinn
- * Null
- *
- * Revision 1.13  1996/10/11  15:06:55  quinn
- * Version 1.3
- *
- * Revision 1.12  1996/06/10  08:57:50  quinn
- * 1.2
- *
- * Revision 1.11  1996/04/10  11:40:33  quinn
- * 1.1pl2
- *
- * Revision 1.10  1996/02/20  12:57:45  quinn
- * V1.1
- *
- * Revision 1.9  1996/01/24  16:01:24  quinn
- * pl4
- *
- * Revision 1.8  1996/01/02  11:46:50  quinn
- * Changed 'operator' to 'roperator' to avoid C++ conflict.
- * Moved to pl3
- *
- * Revision 1.7  1995/12/06  15:50:42  quinn
- * 1.0pl2
- *
- * Revision 1.6  1995/12/05  11:15:57  quinn
- * 1.0pl1
- *
- * Revision 1.5  1995/11/28  09:31:22  quinn
- * Version 1.0
- *
- * Revision 1.4  1995/08/24  15:13:18  quinn
- * Beta 3
- *
- * Revision 1.3  1995/06/27  13:12:07  quinn
- * v1.0b2
- * See CHANGELOG for update info now.
- *
- * Revision 1.2  1995/06/19  13:39:16  quinn
- * 1.0 beta
- * All of basic 1995 should be in place at this point. Some little features
- * added to make the server more useful. BER dumper for bad protocol debugging.
- * Etc. First major release. All following releases should come with
- * a changelog.
- *
- * Revision 1.1  1995/06/14  12:34:55  quinn
- * Moved version.h to include/
- *
- * Revision 1.4  1995/06/07  14:43:57  quinn
- * Various work towards first public release. Specifically, the CLOSE
- * service has been added.
- *
- * Revision 1.3  1995/05/29  09:52:38  quinn
- * Second pre-release.
- *
- * Revision 1.2  1995/05/16  10:22:47  quinn
- * 0.1 beta
- * Fairly stable version with structure in place for asynchronous server
- * activity (the backend doesn't have complete support for this yet).
- *
- * Revision 1.1  1995/05/16  08:49:38  quinn
- * Introduced version control
- *
- */
-
-#ifndef YAZ_VERSION
-#define YAZ_VERSION "1.4pl2+"
-#endif
diff --git a/include/yaz/backend.h b/include/yaz/backend.h
new file mode 100644 (file)
index 0000000..10e8e0a
--- /dev/null
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: backend.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.28  1999/11/04 14:58:44  adam
+ * Added status elements for backend delete result set handler.
+ * Updated delete result result set command for client.
+ *
+ * Revision 1.27  1999/10/11 10:01:24  adam
+ * Implemented bend_sort_rr handler for frontend server.
+ *
+ * Revision 1.26  1999/06/17 10:54:44  adam
+ * Added facility to specify implementation version - and name
+ * for server.
+ *
+ * Revision 1.25  1999/06/01 14:29:12  adam
+ * Work on Extended Services.
+ *
+ * Revision 1.24  1999/03/31 11:18:24  adam
+ * Implemented odr_strdup. Added Reference ID to backend server API.
+ *
+ * Revision 1.23  1998/10/13 16:12:23  adam
+ * Added support for Surrogate Diagnostics for Scan Term entries.
+ *
+ * Revision 1.22  1998/09/02 12:41:51  adam
+ * Added decode stream in bend search structures.
+ *
+ * Revision 1.21  1998/07/20 12:38:41  adam
+ * Implemented delete result set service to server API.
+ *
+ * Revision 1.20  1998/05/27 16:57:06  adam
+ * Support for surrogate diagnostic records added for bend_fetch.
+ *
+ * Revision 1.19  1998/03/31 11:07:45  adam
+ * Furhter work on UNIverse resource report.
+ * Added Extended Services handling in frontend server.
+ *
+ * Revision 1.18  1998/02/10 11:03:56  adam
+ * Added support for extended handlers in backend server interface.
+ *
+ * Revision 1.17  1998/01/29 13:15:35  adam
+ * Implemented sort for the backend interface.
+ *
+ * Revision 1.16  1997/09/17 12:10:31  adam
+ * YAZ version 1.4.
+ *
+ */
+
+#ifndef BACKEND_H
+#define BACKEND_H
+
+#include <yaz/yconfig.h>
+#include <yaz/proto.h>
+#include <yaz/statserv.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+typedef struct request *bend_request;
+typedef struct association *bend_association;
+
+/* old search request input */ 
+typedef struct 
+{
+    char *setname;             /* name to give to this set */
+    int replace_set;           /* replace set, if it already exists */
+    int num_bases;             /* number of databases in list */
+    char **basenames;          /* databases to search */
+    Z_ReferenceId *referenceId;/* reference ID */
+    Z_Query *query;            /* query structure */
+    ODR stream;                /* encoding stream */
+    ODR decode;                /* decoding stream */
+} bend_searchrequest;
+
+/* old search request output */
+typedef struct
+{
+    int hits;                  /* number of hits */
+    int errcode;               /* 0==OK */
+    char *errstring;           /* system error string or NULL */
+} bend_searchresult;
+
+/* extended search handler (rr = request response) */
+typedef struct {
+    char *setname;             /* name to give to this set */
+    int replace_set;           /* replace set, if it already exists */
+    int num_bases;             /* number of databases in list */
+    char **basenames;          /* databases to search */
+    Z_ReferenceId *referenceId;/* reference ID */
+    Z_Query *query;            /* query structure */
+    ODR stream;                /* encode stream */
+    ODR decode;                /* decode stream */
+
+    bend_request request;
+    bend_association association;
+    int *fd;
+    int hits;                  /* number of hits */
+    int errcode;               /* 0==OK */
+    char *errstring;           /* system error string or NULL */
+} bend_search_rr;
+
+/* extended present handler. Does not replace bend_fetch. */
+typedef struct {
+    char *setname;             /* set name */
+    int start;
+    int number;                /* record number */
+    oid_value format;          /* One of the CLASS_RECSYN members */
+    Z_ReferenceId *referenceId;/* reference ID */
+    Z_RecordComposition *comp; /* Formatting instructions */
+    ODR stream;                /* encoding stream - memory source if required */
+    bend_request request;
+    bend_association association;
+
+    int hits;                  /* number of hits */
+    int errcode;               /* 0==OK */
+    char *errstring;           /* system error string or NULL */
+} bend_present_rr;
+
+YAZ_EXPORT bend_searchresult *bend_search(void *handle, bend_searchrequest *r,
+                                          int *fd);
+YAZ_EXPORT int bend_searchresponse(void *handle, bend_search_rr *bsrr);
+
+typedef struct
+{
+    char *setname;             /* set name */
+    int number;                /* record number */
+    Z_ReferenceId *referenceId;/* reference ID */
+    oid_value format;          /* One of the CLASS_RECSYN members */
+    Z_RecordComposition *comp; /* Formatting instructions */
+    ODR stream;                /* encoding stream - memory source if req */
+    int surrogate_flag;        /* surrogate diagnostic flag (rw) */
+} bend_fetchrequest;
+
+typedef struct
+{
+    char *basename;            /* name of database that provided record */
+    int len;                   /* length of record or -1 if structured */
+    char *record;              /* record */
+    int last_in_set;           /* is it?  */
+    oid_value format;          /* format */
+    int errcode;               /* 0==success */
+    char *errstring;           /* system error string or NULL */
+} bend_fetchresult;
+
+YAZ_EXPORT bend_fetchresult *bend_fetch(void *handle, bend_fetchrequest *r,
+                                        int *fd);
+YAZ_EXPORT bend_fetchresult *bend_fetchresponse(void *handle);
+
+typedef struct
+{
+    int num_bases;      /* number of elements in databaselist */
+    char **basenames;   /* databases to search */
+    oid_value attributeset;
+    Z_ReferenceId *referenceId; /* reference ID */
+    Z_AttributesPlusTerm *term;
+    int term_position;  /* desired index of term in result list */
+    int num_entries;    /* number of entries requested */
+    ODR stream;         /* encoding stream - memory source if required */
+} bend_scanrequest;
+
+struct scan_entry {
+    char *term;         /* the returned scan term */
+    int occurrences;    /* no of occurrences or -1 if error (see below) */
+    int errcode;        /* Bib-1 diagnostic code; only used when occur.= -1 */
+    char *errstring;    /* Additional string */
+};
+
+typedef enum {
+    BEND_SCAN_SUCCESS,  /* ok */
+    BEND_SCAN_PARTIAL   /* not all entries could be found */
+} bend_scan_status;
+
+typedef struct bend_scanresult
+{
+    int num_entries;
+    struct scan_entry *entries;
+    int term_position;
+    bend_scan_status status;
+    int errcode;
+    char *errstring;
+} bend_scanresult;
+
+typedef struct bend_scan_rr {
+    int num_bases;      /* number of elements in databaselist */
+    char **basenames;   /* databases to search */
+    oid_value attributeset;
+    Z_ReferenceId *referenceId; /* reference ID */
+    Z_AttributesPlusTerm *term;
+    ODR stream;         /* encoding stream - memory source if required */
+
+    int term_position;  /* desired index of term in result list/returned */
+    int num_entries;    /* number of entries requested/returned */
+
+    struct scan_entry *entries;
+    bend_scan_status status;
+    int errcode;
+    char *errstring;
+} bend_scan_rr;
+
+YAZ_EXPORT bend_scanresult *bend_scan(void *handle, bend_scanrequest *r,
+                                      int *fd);
+YAZ_EXPORT bend_scanresult *bend_scanresponse(void *handle);
+
+/* delete handler */
+typedef struct bend_delete_rr {
+    int function;
+    int num_setnames;
+    char **setnames;
+    Z_ReferenceId *referenceId;
+    int delete_status;      /* status for the whole operation */
+    int *statuses;          /* status each set - indexed as setnames */
+    ODR stream;
+} bend_delete_rr;
+
+/* close handler */
+YAZ_EXPORT void bend_close(void *handle);
+
+/* sort handler */
+typedef struct bend_sort_rr
+{
+    int num_input_setnames;
+    char **input_setnames;
+    char *output_setname;
+    Z_SortKeySpecList *sort_sequence;
+    ODR stream;
+    Z_ReferenceId *referenceId;/* reference ID */
+
+    int sort_status;
+    int errcode;
+    char *errstring;
+} bend_sort_rr;
+
+/* extended services handler. Added in from DALI */
+typedef struct bend_esrequest_rr
+{
+    int ItemNo;
+    Z_ExtendedServicesRequest *esr;
+    
+    ODR stream;                /* encoding stream */
+    Z_ReferenceId *referenceId;/* reference ID */
+    bend_request request;
+    bend_association association;
+    int errcode;               /* 0==success, -1==accepted, >0 = failure */
+    char *errstring;           /* system error string or NULL */
+} bend_esrequest_rr;
+
+typedef struct bend_initrequest
+{
+    char *configname;
+    Z_IdAuthentication *auth;
+    ODR stream;                /* encoding stream */
+    Z_ReferenceId *referenceId;/* reference ID */
+    
+    char *implementation_name;
+    char *implementation_version;
+    int (*bend_sort) (void *handle, bend_sort_rr *rr);
+    int (*bend_search) (void *handle, bend_search_rr *rr);
+    int (*bend_present) (void *handle, bend_present_rr *rr);
+    int (*bend_esrequest) (void *handle, bend_esrequest_rr *rr);
+    int (*bend_delete)(void *handle, bend_delete_rr *rr);
+    int (*bend_scan)(void *handle, bend_scan_rr *rr);
+} bend_initrequest;
+
+typedef struct bend_initresult
+{
+    int errcode;               /* 0==OK */
+    char *errstring;           /* system error string or NULL */
+    void *handle;              /* private handle to the backend module */
+} bend_initresult;
+
+YAZ_EXPORT bend_initresult *bend_init(bend_initrequest *r);
+
+YAZ_EXPORT void bend_request_send (bend_association a, bend_request req,
+                                  Z_APDU *res);
+
+YAZ_EXPORT bend_request bend_request_mk (bend_association a);
+
+YAZ_EXPORT void bend_request_destroy (bend_request *req);
+
+YAZ_EXPORT Z_ReferenceId *bend_request_getid (ODR odr, bend_request req);
+YAZ_EXPORT int bend_backend_respond (bend_association a, bend_request req);
+YAZ_EXPORT void bend_request_setdata(bend_request r, void *p);
+YAZ_EXPORT void *bend_request_getdata(bend_request r);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/ccl.h b/include/yaz/ccl.h
new file mode 100644 (file)
index 0000000..2c99421
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ * Copyright (c) 1995, the EUROPAGATE consortium (see below).
+ *
+ * The EUROPAGATE consortium members are:
+ *
+ *    University College Dublin
+ *    Danmarks Teknologiske Videnscenter
+ *    An Chomhairle Leabharlanna
+ *    Consejo Superior de Investigaciones Cientificas
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of EUROPAGATE or the project partners may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * 3. Users of this software (implementors and gateway operators) agree to
+ * inform the EUROPAGATE consortium of their use of the software. This
+ * information will be used to evaluate the EUROPAGATE project and the
+ * software, and to plan further developments. The consortium may use
+ * the information in later publications.
+ * 
+ * 4. Users of this software agree to make their best efforts, when
+ * documenting their use of the software, to acknowledge the EUROPAGATE
+ * consortium, and the role played by the software in their work.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL THE EUROPAGATE CONSORTIUM OR ITS MEMBERS BE LIABLE
+ * FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF
+ * ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ * OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND
+ * ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
+ * USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * CCL - header file
+ *
+ * $Log: ccl.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.9  1998/02/11 11:53:33  adam
+ * Changed code so that it compiles as C++.
+ *
+ * Revision 1.8  1997/09/29 09:01:19  adam
+ * Changed CCL parser to be thread safe. New type, CCL-parser, declared
+ * and a create/destructor ccl_parser_create/ccl_parser_destroy has been
+ * added.
+ *
+ * Revision 1.7  1997/09/01 08:49:47  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.6  1997/05/14 06:53:37  adam
+ * C++ support.
+ *
+ * Revision 1.5  1997/04/30 08:52:08  quinn
+ * Null
+ *
+ * Revision 1.4  1996/10/11  15:02:26  adam
+ * CCL parser from Europagate Email gateway 1.0.
+ *
+ * Revision 1.10  1996/01/08  08:41:22  adam
+ * Minor changes.
+ *
+ * Revision 1.9  1995/07/20  08:15:16  adam
+ * Bug fix: Token value for comma and OR were the same!
+ *
+ * Revision 1.8  1995/07/11  12:28:34  adam
+ * New function: ccl_token_simple (split into simple tokens) and
+ *  ccl_token_del (delete tokens).
+ *
+ * Revision 1.7  1995/05/16  09:39:38  adam
+ * LICENSE.
+ *
+ * Revision 1.6  1995/05/11  14:04:03  adam
+ * Changes in the reading of qualifier(s). New function: ccl_qual_fitem.
+ * New variable ccl_case_sensitive, which controls whether reserved
+ * words and field names are case sensitive or not.
+ *
+ * Revision 1.5  1995/02/23  08:32:11  adam
+ * Changed header.
+ *
+ * Revision 1.3  1995/02/16  13:20:10  adam
+ * Spell fix.
+ *
+ * Revision 1.2  1995/02/15  17:43:08  adam
+ * Minor changes to the ccl interface. Bug fix in iso2709 module.
+ *
+ * Revision 1.1  1995/02/14  19:55:21  adam
+ * Header files ccl.h/cclp.h are gone! They have been merged an
+ * moved to ../include/ccl.h.
+ *
+ */
+
+#ifndef CCL_H
+#define CCL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+/* CCL error numbers */
+#define CCL_ERR_OK                0
+#define CCL_ERR_TERM_EXPECTED     1
+#define CCL_ERR_RP_EXPECTED       2
+#define CCL_ERR_SETNAME_EXPECTED  3
+#define CCL_ERR_OP_EXPECTED       4
+#define CCL_ERR_BAD_RP            5
+#define CCL_ERR_UNKNOWN_QUAL      6
+#define CCL_ERR_DOUBLE_QUAL       7
+#define CCL_ERR_EQ_EXPECTED       8
+#define CCL_ERR_BAD_RELATION      9
+#define CCL_ERR_TRUNC_NOT_LEFT   10
+#define CCL_ERR_TRUNC_NOT_BOTH   11
+#define CCL_ERR_TRUNC_NOT_RIGHT  12
+    
+/* attribute pair (type, value) */
+struct ccl_rpn_attr {
+    struct ccl_rpn_attr *next;
+    int type;
+    int value;
+};
+
+#define CCL_RPN_AND 1
+#define CCL_RPN_OR 2
+#define CCL_RPN_NOT 3
+#define CCL_RPN_TERM 4
+#define CCL_RPN_SET 5
+#define CCL_RPN_PROX 6
+
+/* RPN tree structure */
+struct ccl_rpn_node {
+    int kind;
+    union {
+       struct ccl_rpn_node *p[2];
+       struct {
+           char *term;
+           struct ccl_rpn_attr *attr_list;
+       } t;
+       char *setname;
+    } u;
+};
+
+typedef struct ccl_qualifiers *CCL_bibset;
+
+/* use (1)
+
+   relation (2)
+                            -1  none
+                             0  ordered
+                           1-6  relation (<, <=, =, >=, >, <>)
+
+   position (3)
+                            -1  none
+                             1  first in field
+                             2  first in sub field
+                             3  any position in field
+   structure (4)
+                            -1  none
+                             0  word/phrase auto select
+                             1  phrase
+                             2  word
+                             3  key
+                             4  year
+                             5  date (normalized)
+                             6  word list 
+                           100  date (un-normalized)
+                           101  name (normalized)
+                           102  name (un-normalized)
+   truncation (5)                            
+   completeness (6)
+*/
+
+#define CCL_BIB1_USE 1
+#define CCL_BIB1_REL 2
+#define CCL_BIB1_POS 3
+#define CCL_BIB1_STR 4
+#define CCL_BIB1_TRU 5
+#define CCL_BIB1_COM 6
+
+#define CCL_BIB1_STR_WP (-1)
+#define CCL_BIB1_REL_ORDER (-1)
+
+#define CCL_BIB1_TRU_CAN_LEFT (-1)
+#define CCL_BIB1_TRU_CAN_RIGHT (-2)
+#define CCL_BIB1_TRU_CAN_BOTH  (-3)
+#define CCL_BIB1_TRU_CAN_NONE  (-4)
+
+#define CCL_TOK_EOL   0
+#define CCL_TOK_TERM  1
+#define CCL_TOK_REL   2
+#define CCL_TOK_EQ    3
+#define CCL_TOK_PROX  4
+#define CCL_TOK_LP    5
+#define CCL_TOK_RP    6
+#define CCL_TOK_COMMA 7
+#define CCL_TOK_AND   8
+#define CCL_TOK_OR    9
+#define CCL_TOK_NOT   10
+#define CCL_TOK_MINUS 11
+#define CCL_TOK_SET   12
+
+/* CCL token */
+struct ccl_token {
+    char kind;
+    size_t len;
+    const char *name;
+    struct ccl_token *next;
+    struct ccl_token *prev;
+};
+
+/* CCL Qualifier */
+struct ccl_qualifier {
+    char *name;
+    struct ccl_rpn_attr *attr_list;
+    struct ccl_qualifier *next;
+};
+
+struct ccl_parser {
+/* current lookahead token */
+    struct ccl_token *look_token;
+    
+/* holds error code if error occur (and approx position of error) */
+    int error_code;
+    const char *error_pos;
+    
+/* current bibset */
+    CCL_bibset bibset;
+    
+    char *ccl_token_and;
+    char *ccl_token_or;
+    char *ccl_token_not;
+    char *ccl_token_set;
+    int ccl_case_sensitive;
+};
+    
+typedef struct ccl_parser *CCL_parser;
+    
+/* Generate tokens from command string - obeys all CCL opererators */
+struct ccl_token *ccl_parser_tokenize (CCL_parser cclp,
+                                      const char *command);
+struct ccl_token *ccl_tokenize (const char *command);
+    
+/* Generate tokens from command string - oebeys only simple tokens and 
+   quoted strings */
+struct ccl_token *ccl_token_simple (const char *command);
+
+/* Delete token list */
+void ccl_token_del (struct ccl_token *list);
+
+/* Parse CCL Find command - NULL-terminated string */
+struct ccl_rpn_node *ccl_find_str (CCL_bibset bibset,
+                                   const char *str, int *error, int *pos);
+
+/* Parse CCL Find command - Tokens read by ccl_tokenize */
+struct ccl_rpn_node *ccl_find (CCL_bibset abibset, struct ccl_token *list,
+                               int *error, const char **pos);
+
+/* Return english-readable error message */
+const char *ccl_err_msg (int ccl_errno);
+
+/* Delete RPN tree returned by ccl_find */
+void ccl_rpn_delete (struct ccl_rpn_node *rpn);
+
+/* Dump RPN tree in readable format to fd_out */
+void ccl_pr_tree (struct ccl_rpn_node *rpn, FILE *fd_out);
+
+/* Add CCL qualifier */
+void ccl_qual_add (CCL_bibset b, const char *name, int no, int *attr);
+
+/* Read CCL qualifier list spec from file inf */
+void ccl_qual_file (CCL_bibset bibset, FILE *inf);
+
+/* Add CCL qualifier by using single-line spec */
+void ccl_qual_fitem (CCL_bibset bibset, const char *cp, const char *qual_name);
+
+/* Make CCL qualifier set */
+CCL_bibset ccl_qual_mk (void);
+
+/* Delete CCL qualifier set */
+void ccl_qual_rm (CCL_bibset *b);
+
+/* Char-to-upper function */
+extern int (*ccl_toupper)(int c);
+
+/* String utilities */
+int ccl_stricmp (const char *s1, const char *s2);
+int ccl_memicmp (const char *s1, const char *s2, size_t n);
+
+/* Search for qualifier 'name' in set 'b'. */
+struct ccl_rpn_attr *ccl_qual_search (CCL_parser cclp, const char *name,
+                                      size_t len);
+
+/* Create CCL parser */
+CCL_parser ccl_parser_create (void);
+
+/* Destroy CCL parser */
+void ccl_parser_destroy (CCL_parser p);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/include/yaz/comstack.h b/include/yaz/comstack.h
new file mode 100644 (file)
index 0000000..4221e4c
--- /dev/null
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 1995-1998, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: comstack.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.22  1998/06/22 11:32:37  adam
+ * Added 'conditional cs_listen' feature.
+ *
+ * Revision 1.21  1998/05/20 09:52:39  adam
+ * Removed 'dead' definition.
+ *
+ * Revision 1.20  1998/05/18 13:06:55  adam
+ * Changed the way attribute sets are handled by the retriaval module.
+ * Extended Explain conversion / schema.
+ * Modified server and client to work with ASN.1 compiled protocol handlers.
+ *
+ * Revision 1.19  1997/09/29 07:16:14  adam
+ * Array cs_errlist no longer global.
+ *
+ * Revision 1.18  1997/09/17 12:10:31  adam
+ * YAZ version 1.4.
+ *
+ * Revision 1.17  1997/09/01 08:49:47  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.16  1997/05/14 06:53:37  adam
+ * C++ support.
+ *
+ * Revision 1.15  1996/07/06 19:58:32  quinn
+ * System headerfiles gathered in yconfig
+ *
+ * Revision 1.14  1996/02/10  12:23:41  quinn
+ * Enable inetd operations fro TCP/IP stack
+ *
+ * Revision 1.13  1995/11/01  13:54:33  quinn
+ * Minor adjustments
+ *
+ * Revision 1.12  1995/10/30  12:41:27  quinn
+ * Added hostname lookup for server.
+ *
+ * Revision 1.11  1995/09/29  17:12:01  quinn
+ * Smallish
+ *
+ * Revision 1.10  1995/09/29  17:01:48  quinn
+ * More Windows work
+ *
+ * Revision 1.9  1995/09/28  10:12:36  quinn
+ * Windows-support changes
+ *
+ * Revision 1.8  1995/09/27  15:02:46  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.7  1995/06/19  12:38:24  quinn
+ * Reorganized include-files. Added small features.
+ *
+ * Revision 1.6  1995/05/30  10:54:51  quinn
+ * Added some backwards compatibility to the comstack (CS_SR->PROTO_SR)
+ *
+ * Revision 1.5  1995/05/29  08:11:31  quinn
+ * Moved oid from odr/asn to util.
+ *
+ * Revision 1.4  1995/05/16  08:50:29  quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.3  1995/04/20  15:12:44  quinn
+ * Cosmetic
+ *
+ * Revision 1.2  1995/04/17  11:28:17  quinn
+ * Smallish
+ *
+ * Revision 1.1  1995/03/30  09:39:40  quinn
+ * Moved .h files to include directory
+ *
+ * Revision 1.11  1995/03/27  08:36:05  quinn
+ * Some work on nonblocking operation in xmosi.c and rfct.c.
+ * Added protocol parameter to cs_create()
+ *
+ * Revision 1.10  1995/03/20  09:47:12  quinn
+ * Added server-side support to xmosi.c
+ * Fixed possible problems in rfct
+ * Other little mods
+ *
+ * Revision 1.9  1995/03/15  15:36:27  quinn
+ * Mods to support nonblocking I/O
+ *
+ * Revision 1.8  1995/03/14  17:00:07  quinn
+ * Bug-fixes - added tracing info to tcpip.c
+ *
+ * Revision 1.7  1995/03/14  10:28:35  quinn
+ * Adding server-side support to tcpip.c and fixing bugs in nonblocking I/O
+ *
+ * Revision 1.6  1995/03/07  16:29:45  quinn
+ * Various fixes.
+ *
+ * Revision 1.5  1995/03/07  10:39:31  quinn
+ * Added cs_fileno
+ *
+ * Revision 1.4  1995/03/06  16:49:29  adam
+ * COMSTACK type inspection possible with cs_type.
+ *
+ * Revision 1.3  1995/02/14  11:54:48  quinn
+ * Beginning to add full CCL.
+ *
+ * Revision 1.2  1995/02/10  18:58:10  quinn
+ * Fixed tcpip_get (formerly tcpip_read).
+ * Turned tst (cli) into a proper, event-driven thing.
+ *
+ * Revision 1.1  1995/02/09  15:51:51  quinn
+ * Works better now.
+ *
+ */
+
+#ifndef COMSTACK_H
+#define COMSTACK_H
+
+#define YNETINCLUDE
+#include <yaz/yconfig.h>
+#include <yaz/oid.h>
+#include <yaz/xmalloc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define COMSTACK_DEFAULT_TIMEOUT -1  /* not used yet */
+
+struct comstack;
+typedef struct comstack *COMSTACK;
+typedef COMSTACK (*CS_TYPE)(int s, int blocking, int protocol);
+
+struct comstack
+{
+    CS_TYPE type;
+    int cerrno;     /* current error code of this stack */
+    char *stackerr;/* current lower-layer error string, or null if none */
+    int iofile;    /* UNIX file descriptor for iochannel */
+    int timeout;   /* how long to wait for trailing blocks (ignored for now) */
+    void *cprivate;/* state info for lower stack */
+    int more;      /* connection has extra data in buffer */
+    int state;     /* current state */
+#define CS_UNBND      0
+#define CS_IDLE       1
+#define CS_INCON      2
+#define CS_OUTCON     3
+#define CS_DATAXFER   4
+    int newfd;     /* storing new descriptor between listen and accept */
+    int blocking;  /* is this link (supposed to be) blocking? */
+    int event;     /* current event */
+#define CS_NONE       0
+#define CS_CONNECT    1
+#define CS_DISCON     2
+#define CS_LISTEN     3
+#define CS_DATA       4
+    enum oid_proto protocol;  /* what application protocol are we talking? */
+    int (*f_put)(COMSTACK handle, char *buf, int size);
+    int (*f_get)(COMSTACK handle, char **buf, int *bufsize);
+    int (*f_more)(COMSTACK handle);
+    int (*f_connect)(COMSTACK handle, void *address);
+    int (*f_rcvconnect)(COMSTACK handle);
+    int (*f_bind)(COMSTACK handle, void *address, int mode);
+#define CS_CLIENT 0
+#define CS_SERVER 1
+    int (*f_listen)(COMSTACK h, char *raddr, int *addrlen,
+                  int (*check_ip)(void *cd, const char *a, int len, int type),
+                  void *cd);
+    COMSTACK (*f_accept)(COMSTACK handle);
+    int (*f_close)(COMSTACK handle);
+    char *(*f_addrstr)(COMSTACK handle);
+    void *(*f_straddr)(COMSTACK handle, const char *str);
+};
+
+#define cs_put(handle, buf, size) ((*(handle)->f_put)(handle, buf, size))
+#define cs_get(handle, buf, size) ((*(handle)->f_get)(handle, buf, size))
+#define cs_more(handle) ((*(handle)->f_more)(handle))
+#define cs_connect(handle, address) ((*(handle)->f_connect)(handle, address))
+#define cs_rcvconnect(handle) ((*(handle)->f_rcvconnect)(handle))
+#define cs_bind(handle, ad, mo) ((*(handle)->f_bind)(handle, ad, mo))
+#define cs_listen(handle, ap, al) ((*(handle)->f_listen)(handle, ap, al, 0, 0))
+#define cs_listen_check(handle, ap, al, cf, cd) ((*(handle)->f_listen)(handle, ap, al, cf, cd))
+#define cs_accept(handle) ((*(handle)->f_accept)(handle))
+#define cs_close(handle) ((*(handle)->f_close)(handle))
+#define cs_create(type, blocking, proto) ((*type)(-1, blocking, proto))
+#define cs_createbysocket(sock, type, blocking, proto) \
+       ((*type)(sock, blocking, proto))
+#define cs_type(handle) ((handle)->type)
+#define cs_fileno(handle) ((handle)->iofile)
+#define cs_stackerr(handle) ((handle)->stackerr)
+#define cs_getstate(handle) ((handle)->getstate)
+#define cs_errno(handle) ((handle)->cerrno)
+#define cs_getproto(handle) ((handle)->protocol)
+#define cs_addrstr(handle) ((*(handle)->f_addrstr)(handle))
+#define cs_straddr(handle, str) ((*(handle)->f_straddr)(handle, str))
+
+YAZ_EXPORT const char *cs_strerror(COMSTACK h);
+YAZ_EXPORT const char *cs_errmsg(int n);
+
+/*
+ * error management.
+ */
+
+#define CSNONE     0
+#define CSYSERR    1
+#define CSOUTSTATE 2
+#define CSNODATA   3
+#define CSWRONGBUF 4
+#define CSDENY     5
+
+/* backwards compatibility */
+#define CS_SR     PROTO_SR
+#define CS_Z3950  PROTO_Z3950
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/d1_attset.h b/include/yaz/d1_attset.h
new file mode 100644 (file)
index 0000000..1f2f71a
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 1995-1998, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef D1_ATTSET_H
+#define D1_ATTSET_H
+
+#include <yaz/oid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This structure describes a attset, perhaps made up by inclusion
+ * (supersetting) of other attribute sets. When indexing and searching,
+ * we perform a normalisation, where we associate a given tag with
+ * the set that originally defined it, rather than the superset. This
+ * allows the most flexible access. Eg, the tags common to GILS and BIB-1
+ * should be searchable by both names.
+ */
+
+struct data1_attset;
+
+typedef struct data1_local_attribute
+{
+    int local;
+    struct data1_local_attribute *next;
+} data1_local_attribute;
+
+typedef struct data1_attset data1_attset;    
+typedef struct data1_att data1_att;
+typedef struct data1_attset_child data1_attset_child;
+
+struct data1_att
+{
+    data1_attset *parent;          /* attribute set */
+    char *name;                    /* symbolic name of this attribute */
+    int value;                     /* attribute value */
+    data1_local_attribute *locals; /* local index values */
+    data1_att *next;
+};
+
+struct data1_attset_child {
+    data1_attset *child;
+    data1_attset_child *next;
+};
+
+struct data1_attset
+{
+    char *name;          /* symbolic name */
+    oid_value reference;   /* external ID of attset */
+    data1_att *atts;          /* attributes */
+    data1_attset_child *children;  /* included attset */
+    data1_attset *next;       /* next in cache */
+};
+
+typedef struct data1_handle_info *data1_handle;
+
+YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s,
+                                        char *name);
+YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file);
+
+YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/d1_map.h b/include/yaz/d1_map.h
new file mode 100644 (file)
index 0000000..80f9f7b
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 1995,1996 Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef D1_MAP_H
+#define D1_MAP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct data1_maptag
+{
+    int new_field;
+    int type;
+#define D1_MAPTAG_numeric 1
+#define D1_MAPTAG_string 2
+    int which;
+    union
+    {
+       int numeric;
+       char *string;
+    } value;
+    struct data1_maptag *next;
+} data1_maptag;
+
+typedef struct data1_mapunit
+{
+    int no_data;
+    char *source_element_name;
+    data1_maptag *target_path;
+    struct data1_mapunit *next;
+} data1_mapunit;
+
+typedef struct data1_maptab
+{
+    char *name;
+    oid_value target_absyn_ref;
+    char *target_absyn_name;
+    data1_mapunit *map;
+    struct data1_maptab *next;
+} data1_maptab;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/data1.h b/include/yaz/data1.h
new file mode 100644 (file)
index 0000000..ff3c8d0
--- /dev/null
@@ -0,0 +1,568 @@
+/*
+ * Copyright (c) 1995-1998, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: data1.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.42  1999/10/21 12:06:28  adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.41  1999/07/13 13:23:47  adam
+ * Non-recursive version of data1_read_node. data1_read_nodex reads
+ * stream of bytes (instead of buffer in memory).
+ *
+ * Revision 1.40  1998/11/03 10:14:12  adam
+ * Changed definition of data1 node so that it uses less space.
+ *
+ * Revision 1.39  1998/10/28 15:10:06  adam
+ * Added --with-yc option to configure. For the data1_node in data1.h:
+ * decreased size of localdata and removed member "line" which wasn't useful.
+ *
+ * Revision 1.38  1998/10/15 08:29:15  adam
+ * Tag set type may be specified in reference to it using "tagset"
+ * directive in .abs-files and "include" directive in .tag-files.
+ *
+ * Revision 1.37  1998/10/13 16:09:46  adam
+ * Added support for arbitrary OID's for tagsets, schemas and attribute sets.
+ * Added support for multiple attribute set references and tagset references
+ * from an abstract syntax file.
+ * Fixed many bad logs-calls in routines that read the various
+ * specifications regarding data1 (*.abs,*.att,...) and made the messages
+ * consistent whenever possible.
+ * Added extra 'lineno' argument to function readconf_line.
+ *
+ * Revision 1.36  1998/05/18 13:06:57  adam
+ * Changed the way attribute sets are handled by the retriaval module.
+ * Extended Explain conversion / schema.
+ * Modified server and client to work with ASN.1 compiled protocol handlers.
+ *
+ * Revision 1.35  1998/03/05 08:15:32  adam
+ * Implemented data1_add_insert_taggeddata utility which is more flexible
+ * than data1_insert_taggeddata.
+ *
+ * Revision 1.34  1998/02/27 14:08:04  adam
+ * Added const to some char pointer arguments.
+ * Reworked data1_read_node so that it doesn't create a tree with
+ * pointers to original "SGML"-buffer.
+ *
+ * Revision 1.33  1997/12/18 10:51:30  adam
+ * Implemented sub-trees feature for schemas - including forward
+ * references.
+ *
+ * Revision 1.32  1997/12/09 16:18:16  adam
+ * Work on EXPLAIN schema. First implementation of sub-schema facility
+ * in the *.abs files.
+ *
+ * Revision 1.31  1997/11/18 09:51:08  adam
+ * Removed element num_children from data1_node. Minor changes in
+ * data1 to Explain.
+ *
+ * Revision 1.30  1997/10/31 12:20:07  adam
+ * Improved memory debugging for xmalloc/nmem.c. References to NMEM
+ * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
+ * Bug fix: missing fclose in data1_read_espec1.
+ *
+ * Revision 1.29  1997/10/27 13:54:18  adam
+ * Changed structure field in data1 node to be simple string which
+ * is "unknown" to the retrieval system itself.
+ *
+ * Revision 1.28  1997/10/06 09:37:53  adam
+ * Added prototype for data1_get_map_buf.
+ *
+ * Revision 1.27  1997/09/24 13:35:44  adam
+ * Added two members to data1_marctab to ease reading of weird MARC records.
+ *
+ * Revision 1.26  1997/09/17 12:10:32  adam
+ * YAZ version 1.4.
+ *
+ * Revision 1.25  1997/09/05 09:50:55  adam
+ * Removed global data1_tabpath - uses data1_get_tabpath() instead.
+ *
+ * Revision 1.24  1997/09/01 09:30:39  adam
+ * Added include of yaz-util.h.
+ *
+ * Revision 1.23  1997/09/01 08:58:04  adam
+ * Removed declaration of data1_matchstr since it's a macro.
+ *
+ * Revision 1.22  1997/09/01 08:49:48  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.21  1997/05/14 06:53:38  adam
+ * C++ support.
+ *
+ * Revision 1.20  1996/10/29 13:34:39  adam
+ * New functions to get/set data1_tabpath.
+ *
+ * Revision 1.19  1996/10/11 11:57:16  quinn
+ * Smallish
+ *
+ * Revision 1.18  1996/10/07  15:29:16  quinn
+ * Added SOIF support
+ *
+ * Revision 1.17  1996/07/06  19:58:32  quinn
+ * System headerfiles gathered in yconfig
+ *
+ * Revision 1.16  1996/06/10  08:55:34  quinn
+ * Added Summary. Unfinished work
+ *
+ * Revision 1.15  1996/06/03  09:46:03  quinn
+ * Added OID type.
+ *
+ * Revision 1.14  1996/05/09  07:27:11  quinn
+ * Multiple local values supported.
+ *
+ * Revision 1.13  1996/02/20  16:32:48  quinn
+ * Created util file.
+ *
+ * Revision 1.12  1996/01/18  09:46:34  adam
+ * Changed prototype for reader function parsed to data1_read_record.
+ *
+ * Revision 1.11  1995/12/15  16:19:45  quinn
+ * Added formatted_text.
+ *
+ * Revision 1.10  1995/12/14  11:09:43  quinn
+ * Work on Explain
+ *
+ * Revision 1.9  1995/12/13  15:32:47  quinn
+ * Added sgml-output.
+ *
+ * Revision 1.8  1995/12/13  13:44:23  quinn
+ * Modified Data1-system to use nmem
+ *
+ * Revision 1.7  1995/12/12  16:37:05  quinn
+ * Added destroy element to data1_node.
+ *
+ * Revision 1.6  1995/12/11  15:22:12  quinn
+ * Added last_child field to the node.
+ *
+ * Revision 1.5  1995/12/05  14:26:40  quinn
+ * Added global lbuf to data1_node.
+ *
+ * Revision 1.4  1995/11/13  09:27:29  quinn
+ * Fiddling with the variant stuff.
+ *
+ * Revision 1.3  1995/11/01  16:34:52  quinn
+ * Making data1 look for tables in data1_tabpath
+ *
+ * Revision 1.2  1995/11/01  13:54:35  quinn
+ * Minor adjustments
+ *
+ * Revision 1.1  1995/11/01  13:07:18  quinn
+ * Data1 module now lives in YAZ.
+ *
+ * Revision 1.13  1995/10/25  16:00:49  quinn
+ * USMARC support is now almost operational
+ *
+ * Revision 1.12  1995/10/16  14:02:59  quinn
+ * Changes to support element set names and espec1
+ *
+ * Revision 1.11  1995/10/13  16:05:10  quinn
+ * Adding Espec1-processing
+ *
+ * Revision 1.10  1995/10/11  14:53:46  quinn
+ * Work on variants.
+ *
+ * Revision 1.9  1995/10/10  16:27:59  quinn
+ * *** empty log message ***
+ *
+ * Revision 1.8  1995/10/06  16:44:14  quinn
+ * Work on attribute set mapping, etc.
+ *
+ * Revision 1.7  1995/10/06  12:58:36  quinn
+ * SUTRS support
+ *
+ * Revision 1.6  1995/10/04  09:29:51  quinn
+ * Adjustments to support USGS test data
+ *
+ * Revision 1.5  1995/10/03  17:56:44  quinn
+ * Fixing GRS code.
+ *
+ * Revision 1.4  1995/10/02  14:55:43  quinn
+ * *** empty log message ***
+ *
+ * Revision 1.3  1995/09/15  14:41:43  quinn
+ * GRS1 work
+ *
+ * Revision 1.2  1995/09/14  15:18:14  quinn
+ * Work
+ *
+ * Revision 1.1  1995/09/12  11:24:33  quinn
+ * Beginning to add code for structured records.
+ *
+ *
+ */
+
+#ifndef DATA1_H
+#define DATA1_H
+
+#include <stdio.h>
+
+#include <yaz/nmem.h>
+#include <yaz/oid.h>
+#include <yaz/proto.h>
+
+#include <yaz/d1_attset.h>
+#include <yaz/d1_map.h>
+#include <yaz/yaz-util.h>
+#include <yaz/wrbuf.h>
+
+#define d1_isspace(c) strchr(" \r\n\t\f", c)
+#define d1_isdigit(c) ((c) <= '9' && (c) >= '0')
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define data1_matchstr(s1, s2) yaz_matchstr(s1, s2)
+
+#define DATA1_MAX_SYMBOL 31
+
+typedef struct data1_name
+{
+    char *name;
+    struct data1_name *next;
+} data1_name;
+
+typedef struct data1_absyn_cache_info *data1_absyn_cache;
+typedef struct data1_attset_cache_info *data1_attset_cache;
+
+typedef enum data1_datatype
+{
+    DATA1K_unknown,
+    DATA1K_structured,
+    DATA1K_string,
+    DATA1K_numeric,
+    DATA1K_bool,
+    DATA1K_oid,
+    DATA1K_generalizedtime,
+    DATA1K_intunit,
+    DATA1K_int,
+    DATA1K_octetstring,
+    DATA1K_null
+} data1_datatype;
+
+typedef struct data1_marctab
+{
+    char *name;
+    oid_value reference;
+
+    char record_status[2];
+    char implementation_codes[5];
+    int  indicator_length;
+    int  identifier_length;
+    char user_systems[4];
+
+    int  length_data_entry;
+    int  length_starting;
+    int  length_implementation;
+    char future_use[2];
+
+    int  force_indicator_length;
+    int  force_identifier_length;
+    struct data1_marctab *next;
+} data1_marctab;
+
+typedef struct data1_esetname
+{
+    char *name;
+    Z_Espec1 *spec;
+    struct data1_esetname *next;
+} data1_esetname;
+
+/*
+ * Variant set definitions.
+ */
+
+typedef struct data1_vartype
+{
+    char *name;
+    struct data1_varclass *zclass;
+    int type;
+    data1_datatype datatype;
+    struct data1_vartype *next;
+} data1_vartype;
+
+typedef struct data1_varclass
+{
+    char *name;
+    struct data1_varset *set;
+    int zclass;
+    data1_vartype *types;
+    struct data1_varclass *next;
+} data1_varclass;
+
+typedef struct data1_varset
+{
+    char *name;
+    oid_value reference;
+    data1_varclass *classes;
+} data1_varset;
+
+/*
+ * Tagset definitions
+ */
+
+struct data1_tagset;
+
+typedef struct data1_tag
+{
+    data1_name *names;
+#define DATA1T_numeric 1
+#define DATA1T_string 2
+    int which;
+    union
+    {
+       int numeric;
+       char *string;
+    } value;
+    data1_datatype kind;
+
+    struct data1_tagset *tagset;
+    struct data1_tag *next;
+} data1_tag;
+
+typedef struct data1_tagset data1_tagset;
+
+struct data1_tagset
+{
+    int type;                        /* type of tagset in current context */
+    char *name;                      /* symbolic name */
+    oid_value reference;
+    data1_tag *tags;                 /* tags defined by this set */
+    data1_tagset *children;          /* children */
+    data1_tagset *next;              /* sibling */
+};
+
+typedef struct data1_termlist
+{
+    data1_att *att;
+    char *structure;
+    struct data1_termlist *next;
+} data1_termlist;
+
+/*
+ * abstract syntax specification
+ */
+
+typedef struct data1_element
+{
+    char *name;
+    data1_tag *tag;
+    data1_termlist *termlists;
+    char *sub_name;
+    struct data1_element *children;
+    struct data1_element *next;
+} data1_element;
+
+typedef struct data1_sub_elements {
+    char *name;
+    struct data1_sub_elements *next;
+    data1_element *elements;
+} data1_sub_elements;
+
+typedef struct data1_absyn
+{
+    char *name;
+    oid_value reference;
+    data1_tagset *tagset;
+    data1_attset *attset;
+    data1_varset *varset;
+    data1_esetname *esetnames;
+    data1_maptab *maptabs;
+    data1_marctab *marc;
+    data1_sub_elements *sub_elements;
+    data1_element *main_elements;
+} data1_absyn;
+
+/*
+ * record data node (tag/data/variant)
+ */
+
+typedef struct data1_node
+{
+    /* the root of a record (containing global data) */
+#define DATA1N_root 1 
+    /* a tag */
+#define DATA1N_tag  2       
+    /* some data under a leaf tag or variant */
+#define DATA1N_data 3
+    /* variant specification (a triple, actually) */
+#define DATA1N_variant 4
+    int which;
+
+    union
+    {
+       struct
+       {
+           char *type;
+           data1_absyn *absyn;  /* abstract syntax for this type */
+       } root;
+
+       struct 
+       {
+           char *tag;
+           data1_element *element;
+           int no_data_requested;
+           int get_bytes;
+           unsigned node_selected : 1;
+           unsigned make_variantlist : 1;
+       } tag;
+
+       struct
+       {
+           char *data;      /* filename or data */
+           int len;
+        /* text inclusion */
+#define DATA1I_inctxt 1
+        /* binary data inclusion */
+#define DATA1I_incbin 2
+        /* text data */
+#define DATA1I_text 3 
+        /* numerical data */
+#define DATA1I_num 4
+        /* object identifier */
+#define DATA1I_oid 5         
+            unsigned what:7;
+           unsigned formatted_text : 1;   /* newlines are significant */
+       } data;
+
+       struct
+       {
+           data1_vartype *type;
+           char *value;
+       } variant;
+    } u;
+
+    void (*destroy)(struct data1_node *n);
+#define DATA1_LOCALDATA 12
+    char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */
+    struct data1_node *next;
+    struct data1_node *child;
+    struct data1_node *last_child;
+    struct data1_node *parent;
+    struct data1_node *root;
+} data1_node;
+
+YAZ_EXPORT data1_handle data1_create (void);
+YAZ_EXPORT void data1_destroy(data1_handle dh);
+YAZ_EXPORT data1_node *get_parent_tag(data1_handle dh, data1_node *n);
+YAZ_EXPORT data1_node *data1_read_node(data1_handle dh, const char **buf,
+                                      NMEM m);
+YAZ_EXPORT data1_node *data1_read_nodex (data1_handle dh, NMEM m,
+                                        int (*get_byte)(void *fh), void *fh,
+                                        WRBUF wrbuf);
+YAZ_EXPORT data1_node *data1_read_record(data1_handle dh, 
+                                        int (*rf)(void *, char *, size_t),
+                                        void *fh, NMEM m);
+YAZ_EXPORT data1_absyn *data1_read_absyn(data1_handle dh, const char *file);
+YAZ_EXPORT data1_tag *data1_gettagbynum(data1_handle dh,
+                                       data1_tagset *s,
+                                       int type, int value);
+YAZ_EXPORT data1_tagset *data1_empty_tagset (data1_handle dh);
+YAZ_EXPORT data1_tagset *data1_read_tagset(data1_handle dh, 
+                                          const char *file,
+                                          int type);
+YAZ_EXPORT data1_element *data1_getelementbytagname(data1_handle dh, 
+                                                   data1_absyn *abs,
+                                                   data1_element *parent,
+                                                   const char *tagname);
+YAZ_EXPORT Z_GenericRecord *data1_nodetogr(data1_handle dh, data1_node *n,
+                                          int select, ODR o,
+                                          int *len);
+YAZ_EXPORT data1_tag *data1_gettagbyname(data1_handle dh, data1_tagset *s,
+                                        const char *name);
+YAZ_EXPORT void data1_free_tree(data1_handle dh, data1_node *t);
+YAZ_EXPORT char *data1_nodetobuf(data1_handle dh, data1_node *n,
+                                int select, int *len);
+YAZ_EXPORT data1_node *data1_insert_taggeddata(data1_handle dh,
+                                              data1_node *root,
+                                              data1_node *at,
+                                              const char *tagname, NMEM m);
+YAZ_EXPORT data1_node *data1_add_taggeddata(data1_handle dh, data1_node *root,
+                                           data1_node *at,
+                                           const char *tagname, NMEM m);
+YAZ_EXPORT data1_datatype data1_maptype(data1_handle dh, char *t);
+YAZ_EXPORT data1_varset *data1_read_varset(data1_handle dh, const char *file);
+YAZ_EXPORT data1_vartype *data1_getvartypebyct(data1_handle dh,
+                                              data1_varset *set,
+                                              char *zclass, char *type);
+YAZ_EXPORT Z_Espec1 *data1_read_espec1(data1_handle dh, const char *file);
+YAZ_EXPORT int data1_doespec1(data1_handle dh, data1_node *n, Z_Espec1 *e);
+YAZ_EXPORT data1_esetname *data1_getesetbyname(data1_handle dh, 
+                                              data1_absyn *a,
+                                              const char *name);
+YAZ_EXPORT data1_element *data1_getelementbyname(data1_handle dh,
+                                                data1_absyn *absyn,
+                                                const char *name);
+YAZ_EXPORT data1_node *data1_mk_node(data1_handle dh, NMEM m);
+YAZ_EXPORT data1_absyn *data1_get_absyn(data1_handle dh, const char *name);
+YAZ_EXPORT data1_attset *data1_get_attset (data1_handle dh, const char *name);
+YAZ_EXPORT data1_maptab *data1_read_maptab(data1_handle dh, const char *file);
+YAZ_EXPORT data1_node *data1_map_record(data1_handle dh, data1_node *n,
+                                       data1_maptab *map, NMEM m);
+YAZ_EXPORT data1_marctab *data1_read_marctab (data1_handle dh,
+                                             const char *file);
+YAZ_EXPORT char *data1_nodetomarc(data1_handle dh, data1_marctab *p,
+                                 data1_node *n, int selected, int *len);
+YAZ_EXPORT char *data1_nodetoidsgml(data1_handle dh, data1_node *n,
+                                   int select, int *len);
+YAZ_EXPORT Z_ExplainRecord *data1_nodetoexplain(data1_handle dh,
+                                               data1_node *n, int select,
+                                               ODR o);
+YAZ_EXPORT Z_BriefBib *data1_nodetosummary(data1_handle dh, 
+                                          data1_node *n, int select,
+                                          ODR o);
+YAZ_EXPORT char *data1_nodetosoif(data1_handle dh, data1_node *n, int select,
+                                 int *len);
+YAZ_EXPORT void data1_set_tabpath(data1_handle dh, const char *path);
+YAZ_EXPORT const char *data1_get_tabpath(data1_handle dh);
+
+YAZ_EXPORT WRBUF data1_get_wrbuf (data1_handle dp);
+YAZ_EXPORT char **data1_get_read_buf (data1_handle dp, int **lenp);
+YAZ_EXPORT char **data1_get_map_buf (data1_handle dp, int **lenp);
+YAZ_EXPORT data1_absyn_cache *data1_absyn_cache_get (data1_handle dh);
+YAZ_EXPORT data1_attset_cache *data1_attset_cache_get (data1_handle dh);
+YAZ_EXPORT NMEM data1_nmem_get (data1_handle dh);
+YAZ_EXPORT void data1_pr_tree (data1_handle dh, data1_node *n, FILE *out);
+YAZ_EXPORT char *data1_insert_string (data1_handle dh, data1_node *res,
+                                     NMEM m, const char *str);
+YAZ_EXPORT data1_node *data1_read_sgml (data1_handle dh, NMEM m,
+                                       const char *buf);
+YAZ_EXPORT void data1_absyn_trav (data1_handle dh, void *handle,
+                                 void (*fh)(data1_handle dh,
+                                            void *h, data1_absyn *a));
+
+YAZ_EXPORT data1_attset *data1_attset_search_id (data1_handle dh, int id);
+
+YAZ_EXPORT data1_node 
+*data1_add_insert_taggeddata(data1_handle dh, data1_node *root,
+                             data1_node *at, const char *tagname, NMEM m,
+                             int first_flag, int local_allowed);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/diagbib1.h b/include/yaz/diagbib1.h
new file mode 100644 (file)
index 0000000..136af14
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: diagbib1.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.6  1997/09/01 08:49:48  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.5  1997/05/14 06:53:39  adam
+ * C++ support.
+ *
+ * Revision 1.4  1995/09/29 17:12:02  quinn
+ * Smallish
+ *
+ * Revision 1.3  1995/09/27  15:02:47  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.2  1995/05/16  08:50:30  quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.1  1995/03/30  09:39:40  quinn
+ * Moved .h files to include directory
+ *
+ * Revision 1.1  1995/03/15  13:46:09  adam
+ * New function diagbib1_str.
+ *
+ */
+
+#ifndef DIAGBIB1_H
+#define DIAGBIB1_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT const char *diagbib1_str (int code);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/log.h b/include/yaz/log.h
new file mode 100644 (file)
index 0000000..35e4a80
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: log.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.15  1999/08/27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.14  1998/10/28 10:26:59  adam
+ * New functions log_init_file, log_init_level, log_init_prefix.
+ *
+ * Revision 1.13  1998/10/13 16:11:11  adam
+ * Added printf-format check for logf when using GNUC.
+ *
+ * Revision 1.12  1997/09/04 07:59:02  adam
+ * Added include of xmalloc.h.
+ *
+ * Revision 1.11  1997/09/01 08:49:48  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.10  1997/05/14 06:53:40  adam
+ * C++ support.
+ *
+ * Revision 1.9  1997/05/01 15:06:42  adam
+ * Added log_mask_str_x routine.
+ *
+ * Revision 1.8  1996/05/01 12:45:00  quinn
+ * *** empty log message ***
+ *
+ * Revision 1.7  1996/02/05  12:24:26  adam
+ * Implemented log_event_{start,end}-functions.
+ *
+ * Revision 1.6  1995/10/10  16:27:06  quinn
+ * *** empty log message ***
+ *
+ * Revision 1.5  1995/09/29  17:12:03  quinn
+ * Smallish
+ *
+ * Revision 1.4  1995/09/27  15:02:47  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.3  1995/06/19  12:38:25  quinn
+ * Reorganized include-files. Added small features.
+ *
+ * Revision 1.2  1995/05/16  08:50:31  quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.1  1995/03/30  09:39:41  quinn
+ * Moved .h files to include directory
+ *
+ * Revision 1.4  1994/09/28  13:07:22  adam
+ * Added log_mask_str.
+ *
+ * Revision 1.3  1994/08/18  08:18:45  quinn
+ * Added prefix to log_init.
+ *
+ * Revision 1.2  1994/08/17  14:27:46  quinn
+ * added LOG_ERRNO
+ *
+ * Revision 1.1  1994/08/17  13:22:52  quinn
+ * First version
+ *
+ */
+
+#ifndef LOG_H
+#define LOG_H
+
+#include <stdio.h>
+#include <yaz/yconfig.h>
+#include <yaz/xmalloc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define LOG_FATAL 0x0001
+#define LOG_DEBUG 0x0002
+#define LOG_WARN  0x0004
+#define LOG_LOG   0x0008
+#define LOG_ERRNO 0x0010     /* append strerror to message */
+#define LOG_FILE  0x0020
+
+#define LOG_ALL   0xffff
+
+#define LOG_DEFAULT_LEVEL (LOG_FATAL | LOG_ERRNO | LOG_LOG | LOG_WARN)
+
+#define logf yaz_log
+
+YAZ_EXPORT void log_init(int level, const char *prefix, const char *name);
+YAZ_EXPORT void log_init_file (const char *fname);
+YAZ_EXPORT void log_init_level (int level);
+YAZ_EXPORT void log_init_prefix (const char *prefix);
+
+YAZ_EXPORT void yaz_log(int level, const char *fmt, ...)
+#ifdef __GNUC__
+       __attribute__ ((format (printf, 2, 3)))
+#endif
+       ;
+YAZ_EXPORT int log_mask_str (const char *str);
+YAZ_EXPORT int log_mask_str_x (const char *str, int level);
+YAZ_EXPORT FILE *log_file(void);
+
+YAZ_EXPORT void log_event_start (void (*func)(int level, const char *msg, void *info),
+       void *info);
+YAZ_EXPORT void log_event_end (void (*func)(int level, const char *msg, void *info),
+       void *info);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/logrpn.h b/include/yaz/logrpn.h
new file mode 100644 (file)
index 0000000..ec7d345
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 1997-1998, Index Data.
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * $Log: logrpn.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.1  1998/11/16 16:02:32  adam
+ * Added loggin utilies, log_rpn_query and log_scan_term. These used
+ * to be part of Zebra.
+ *
+ */
+
+#ifndef LOG_RPN_H
+#define LOG_RPN_H
+
+#include <yaz/yconfig.h>
+#include <yaz/proto.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT void log_rpn_query (Z_RPNQuery *rpn);
+YAZ_EXPORT void log_scan_term (Z_AttributesPlusTerm *zapt, oid_value ast);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/marcdisp.h b/include/yaz/marcdisp.h
new file mode 100644 (file)
index 0000000..9d120e3
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: marcdisp.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1997/09/24 13:35:45  adam
+ * Added two members to data1_marctab to ease reading of weird MARC records.
+ *
+ * Revision 1.7  1997/09/04 07:57:51  adam
+ * Definition of ISO2709 control characters to this file.
+ *
+ * Revision 1.6  1997/09/01 08:49:49  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.5  1997/05/14 06:53:40  adam
+ * C++ support.
+ *
+ * Revision 1.4  1995/09/29 17:12:03  quinn
+ * Smallish
+ *
+ * Revision 1.3  1995/09/27  15:02:47  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.2  1995/05/16  08:50:32  quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.1  1995/04/10  10:28:28  quinn
+ * Added copy of CCL.
+ *
+ */
+
+#ifndef MARCDISP_H
+#define MARCDISP_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT int marc_display (const char *buf, FILE *outf);
+YAZ_EXPORT int marc_display_ex (const char *buf, FILE *outf, int debug);
+
+#define ISO2709_RS 035
+#define ISO2709_FS 036
+#define ISO2709_IDFS 037
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/nmem.h b/include/yaz/nmem.h
new file mode 100644 (file)
index 0000000..18ff8ad
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 1995-1998, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: nmem.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.10  1998/10/19 15:24:20  adam
+ * New nmem utility, nmem_transfer, that transfer blocks from one
+ * NMEM to another.
+ *
+ * Revision 1.9  1998/10/13 16:00:17  adam
+ * Implemented nmem_critical_{enter,leave}.
+ *
+ * Revision 1.8  1998/07/20 12:35:59  adam
+ * Added more memory diagnostics (when NMEM_DEBUG is 1).
+ *
+ * Revision 1.7  1997/10/31 12:20:08  adam
+ * Improved memory debugging for xmalloc/nmem.c. References to NMEM
+ * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
+ * Bug fix: missing fclose in data1_read_espec1.
+ *
+ */
+
+#ifndef NMEM_H
+#define NMEM_H
+#include <yaz/yconfig.h>
+
+#define NMEM_DEBUG 0
+
+#ifndef NMEM_DEBUG
+#define NMEM_DEBUG 0
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct nmem_block
+{
+    char *buf;              /* memory allocated in this block */
+    int size;               /* size of buf */
+    int top;                /* top of buffer */
+    struct nmem_block *next;
+} nmem_block;
+
+typedef struct nmem_control
+{
+    int total;
+    nmem_block *blocks;
+    struct nmem_control *next;
+} nmem_control;
+
+typedef struct nmem_control *NMEM;
+
+YAZ_EXPORT void nmem_reset(NMEM n);
+YAZ_EXPORT int nmem_total(NMEM n);
+YAZ_EXPORT char *nmem_strdup (NMEM mem, const char *src);
+YAZ_EXPORT void nmem_transfer (NMEM dst, NMEM src);
+
+YAZ_EXPORT void nmem_critical_enter (void);
+YAZ_EXPORT void nmem_critical_leave (void);
+
+#if NMEM_DEBUG
+
+YAZ_EXPORT NMEM nmem_create_f(const char *file, int line);
+YAZ_EXPORT void nmem_destroy_f(const char *file, int line, NMEM n);
+YAZ_EXPORT void *nmem_malloc_f(const char *file, int line, NMEM n, int size);
+#define nmem_create() nmem_create_f(__FILE__, __LINE__)
+#define nmem_destroy(x) nmem_destroy_f(__FILE__, __LINE__, (x))
+#define nmem_malloc(x, y) nmem_malloc_f(__FILE__, __LINE__, (x), (y))
+
+#else
+
+YAZ_EXPORT NMEM nmem_create(void);
+YAZ_EXPORT void nmem_destroy(NMEM n);
+YAZ_EXPORT void *nmem_malloc(NMEM n, int size);
+
+#endif
+
+YAZ_EXPORT void nmem_init (void);
+YAZ_EXPORT void nmem_exit (void);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/odr.h b/include/yaz/odr.h
new file mode 100644 (file)
index 0000000..5b1019a
--- /dev/null
@@ -0,0 +1,386 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Id: odr.h,v 1.1 1999-11-30 13:47:11 adam Exp $
+ */
+
+#ifndef ODR_H
+#define ODR_H
+
+#include <stdio.h>
+#include <string.h>
+
+#include <yaz/yconfig.h>
+#include <yaz/nmem.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef bool_t
+#define bool_t int
+#endif
+
+/*
+ * Tag modes
+ */
+#define ODR_NONE -1
+#define ODR_IMPLICIT 0
+#define ODR_EXPLICIT 1
+
+/*
+ * Classes
+ */
+#define ODR_UNIVERSAL   0
+#define ODR_APPLICATION 1
+#define ODR_CONTEXT     2
+#define ODR_PRIVATE     3
+
+/*
+ * UNIVERSAL tags
+ */
+#define ODR_BOOLEAN     1
+#define ODR_INTEGER     2
+#define ODR_BITSTRING   3
+#define ODR_OCTETSTRING 4
+#define ODR_NULL        5
+#define ODR_OID         6
+#define ODR_ODESC       7
+#define ODR_EXTERNAL    8
+#define ODR_REAL        9
+#define ODR_ENUM        10
+#define ODR_SEQUENCE    16
+#define ODR_SET         17
+#define ODR_NUMERICSTRING   18
+#define ODR_PRINTABLESTRING 19
+#define ODR_GENERALIZEDTIME 24
+#define ODR_GRAPHICSTRING   25
+#define ODR_VISIBLESTRING   26
+#define ODR_GENERALSTRING   27
+
+/*
+ * odr stream directions
+ */
+#define ODR_DECODE      0
+#define ODR_ENCODE      1
+#define ODR_PRINT       2
+
+typedef struct odr_oct
+{
+    unsigned char *buf;
+    int len;
+    int size;
+} Odr_oct;
+
+typedef void Odr_null;
+extern Odr_null *ODR_NULLVAL;
+
+typedef Odr_oct Odr_any;
+
+typedef struct odr_bitmask
+{
+#define ODR_BITMASK_SIZE 256
+    unsigned char bits[ODR_BITMASK_SIZE];
+    int top;
+} Odr_bitmask;
+
+typedef int Odr_oid;   /* terminate by -1 */
+
+typedef struct odr_constack
+{
+    const unsigned char *base;   /* starting point of data */
+    int base_offset;
+    int len;                     /* length of data, if known, else -1
+                                        (decoding only) */
+    const unsigned char *lenb;   /* where to encode length */
+    int len_offset;
+    int lenlen;                  /* length of length-field */
+} odr_constack;
+
+#define ODR_S_SET     0
+#define ODR_S_CUR     1
+#define ODR_S_END     2
+
+typedef struct odr_ecblock
+{
+    int can_grow;         /* are we allowed to reallocate */
+    unsigned char *buf;            /* memory handle */
+    int pos;              /* current position */
+    int top;              /* top of buffer */
+    int size;             /* current buffer size */
+} odr_ecblock;
+
+typedef struct {      /* used to be statics in ber_tag... */
+    int lclass;
+    int ltag;
+    int br;
+    int lcons;
+} Odr_ber_tag;
+
+typedef struct odr
+{
+    int direction;       /* the direction of this stream */
+
+    int error;           /* current error state (0==OK) */
+    const unsigned char *buf;  /* for encoding or decoding */
+    int buflen;          /* size of buffer for encoding, len for decoding */
+    const unsigned char *bp;   /* position in buffer */
+    int left;            /* bytes remaining in buffer */
+
+    odr_ecblock ecb;     /* memory control block */
+
+    int t_class;         /* implicit tagging (-1==default tag) */
+    int t_tag;
+
+    int enable_bias;     /* force choice enable flag */
+    int choice_bias;     /* force choice */
+    int lenlen;          /* force length-of-lenght (odr_setlen()) */
+
+    FILE *print;         /* output file for direction print */
+    int indent;          /* current indent level for printing */
+
+    NMEM mem;            /* memory handle for decoding (primarily) */
+
+    /* stack for constructed types */
+#define ODR_MAX_STACK 50
+    int stackp;          /* top of stack (-1 == initial state) */
+    odr_constack stack[ODR_MAX_STACK];
+
+    Odr_ber_tag odr_ber_tag;
+} *ODR;
+
+typedef int (*Odr_fun)(ODR, char **, int, const char *);
+
+typedef struct odr_arm
+{
+    int tagmode;
+    int zclass;
+    int tag;
+    int which;
+    Odr_fun fun;
+    char *name;
+} Odr_arm;
+
+/*
+ * Error control.
+ */
+#define ONONE           0
+#define OMEMORY         1
+#define OSYSERR         2
+#define OSPACE          3
+#define OREQUIRED       4
+#define OUNEXPECTED     5
+#define OOTHER          6
+#define OPROTO          7
+#define ODATA           8
+#define OSTACK          9
+#define OCONLEN        10
+#define OLENOV         11
+
+extern char *odr_errlist[];
+
+YAZ_EXPORT int odr_geterror(ODR o);
+YAZ_EXPORT void odr_perror(ODR o, char *message);
+YAZ_EXPORT void odr_setprint(ODR o, FILE *file);
+YAZ_EXPORT ODR odr_createmem(int direction);
+YAZ_EXPORT void odr_reset(ODR o);
+YAZ_EXPORT void odr_destroy(ODR o);
+YAZ_EXPORT void odr_setbuf(ODR o, char *buf, int len, int can_grow);
+YAZ_EXPORT char *odr_getbuf(ODR o, int *len, int *size);
+YAZ_EXPORT void *odr_malloc(ODR o, int size);
+YAZ_EXPORT char *odr_strdup(ODR o, const char *str);
+YAZ_EXPORT NMEM odr_extract_mem(ODR o);
+YAZ_EXPORT Odr_null *odr_nullval(void);
+#define odr_release_mem(m) nmem_destroy(m)
+#define ODR_MEM NMEM
+
+#define odr_implicit(o, t, p, cl, tg, opt)\
+        (odr_implicit_settag((o), cl, tg), t ((o), (p), (opt), 0) )
+
+#define odr_implicit_tag(o, t, p, cl, tg, opt, name)\
+        (odr_implicit_settag((o), cl, tg), t ((o), (p), (opt), name) )
+
+#define odr_explicit(o, t, p, cl, tg, opt)\
+        ((int) (odr_constructed_begin((o), (p), (cl), (tg), 0) ? \
+        t ((o), (p), (opt), 0) &&\
+        odr_constructed_end(o) : opt))
+
+#define odr_explicit_tag(o, t, p, cl, tg, opt, name)\
+        ((int) (odr_constructed_begin((o), (p), (cl), (tg), 0) ? \
+        t ((o), (p), (opt), name) &&\
+        odr_constructed_end(o) : opt))
+
+#define ODR_MASK_ZERO(mask)\
+    ((void) (memset((mask)->bits, 0, ODR_BITMASK_SIZE),\
+    (mask)->top = -1))
+
+#define ODR_MASK_SET(mask, num)\
+    (((mask)->bits[(num) >> 3] |= 0X80 >> ((num) & 0X07)),\
+    (mask)->top < (num) >> 3 ? ((mask)->top = (num) >> 3) : 0)
+
+#define ODR_MASK_CLEAR(mask, num)\
+    ((mask)->bits[(num) >> 3] &= ~(0X80 >> ((num) & 0X07)))
+
+#define ODR_MASK_GET(mask, num)  ( ((num) >> 3 <= (mask)->top) ? \
+    ((mask)->bits[(num) >> 3] & (0X80 >> ((num) & 0X07)) ? 1 : 0) : 0)
+
+/* Private macro.
+ * write a single character at the current position - grow buffer if
+ * necessary.
+ * (no, we're not usually this anal about our macros, but this baby is
+ *  next to unreadable without some indentation  :)
+ */
+#define odr_putc(o, c) \
+( \
+    ( \
+        (o)->ecb.pos < (o)->ecb.size ? \
+        ( \
+            (o)->ecb.buf[(o)->ecb.pos++] = (c), \
+            0 \
+        ) : \
+        ( \
+            odr_grow_block(&(o)->ecb, 1) == 0 ? \
+            ( \
+                (o)->ecb.buf[(o)->ecb.pos++] = (c), \
+                0 \
+            ) : \
+            ( \
+                (o)->error = OSPACE, \
+                -1 \
+            ) \
+        ) \
+    ) == 0 ? \
+    ( \
+        (o)->ecb.pos > (o)->ecb.top ? \
+        ( \
+            (o)->ecb.top = (o)->ecb.pos, \
+            0 \
+        ) : \
+        0 \
+    ) : \
+        -1 \
+) \
+
+#define odr_tell(o) ((o)->ecb.pos)
+#define odr_offset(o) ((o)->bp - (o)->buf)
+#define odr_ok(o) (!(o)->error)
+#define odr_getmem(o) ((o)->mem)
+#define odr_setmem(o, v) ((o)->mem = (v))
+
+#define ODR_MAXNAME 256
+
+YAZ_EXPORT int ber_boolean(ODR o, int *val);
+YAZ_EXPORT int ber_tag(ODR o, void *p, int zclass, int tag,
+                      int *constructed, int opt);
+YAZ_EXPORT int ber_enctag(ODR o, int zclass, int tag, int constructed);
+YAZ_EXPORT int ber_dectag(const unsigned char *buf, int *zclass,
+                         int *tag, int *constructed);
+YAZ_EXPORT int odr_bool(ODR o, int **p, int opt, const char *name);
+YAZ_EXPORT int odr_integer(ODR o, int **p, int opt, const char *name);
+YAZ_EXPORT int odr_enum(ODR o, int **p, int opt, const char *name);
+YAZ_EXPORT int odr_implicit_settag(ODR o, int zclass, int tag);
+YAZ_EXPORT int ber_enclen(ODR o, int len, int lenlen, int exact);
+YAZ_EXPORT int ber_declen(const unsigned char *buf, int *len);
+YAZ_EXPORT void odr_prname(ODR o, const char *name);
+YAZ_EXPORT int ber_null(ODR o);
+YAZ_EXPORT int odr_null(ODR o, Odr_null **p, int opt, const char *name);
+YAZ_EXPORT int ber_integer(ODR o, int *val);
+YAZ_EXPORT int odr_constructed_begin(ODR o, void *p, int zclass, int tag,
+                                    const char *name);
+YAZ_EXPORT int odr_constructed_end(ODR o);
+YAZ_EXPORT int odr_sequence_begin(ODR o, void *p, int size, const char *name);
+YAZ_EXPORT int odr_set_begin(ODR o, void *p, int size, const char *name);
+YAZ_EXPORT int odr_sequence_end(ODR o);
+YAZ_EXPORT int odr_set_end(ODR o);
+YAZ_EXPORT int ber_octetstring(ODR o, Odr_oct *p, int cons);
+YAZ_EXPORT int odr_octetstring(ODR o, Odr_oct **p, int opt, const char *name);
+YAZ_EXPORT int odp_more_chunks(ODR o, const unsigned char *base, int len);
+YAZ_EXPORT int odr_constructed_more(ODR o);
+YAZ_EXPORT int odr_bitstring(ODR o, Odr_bitmask **p, int opt,
+                            const char *name);
+YAZ_EXPORT int ber_bitstring(ODR o, Odr_bitmask *p, int cons);
+YAZ_EXPORT int odr_generalstring(ODR o, char **p, int opt, const char *name);
+YAZ_EXPORT int ber_oidc(ODR o, Odr_oid *p);
+YAZ_EXPORT int odr_oid(ODR o, Odr_oid **p, int opt, const char *name);
+YAZ_EXPORT int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp,
+                         const char *name);
+YAZ_EXPORT int odr_cstring(ODR o, char **p, int opt, const char *name);
+YAZ_EXPORT int odr_sequence_of(ODR o, Odr_fun type, void *p, int *num,
+                              const char *name);
+YAZ_EXPORT int odr_set_of(ODR o, Odr_fun type, void *p, int *num,
+                         const char *name);
+YAZ_EXPORT int odr_any(ODR o, Odr_any **p, int opt, const char *name);
+YAZ_EXPORT int ber_any(ODR o, Odr_any **p);
+YAZ_EXPORT int completeBER(const unsigned char *buf, int len);
+YAZ_EXPORT void odr_begin(ODR o);
+YAZ_EXPORT void odr_end(ODR o);
+YAZ_EXPORT Odr_oid *odr_oiddup(ODR odr, Odr_oid *o);
+YAZ_EXPORT Odr_oid *odr_oiddup_nmem(NMEM nmem, Odr_oid *o);
+YAZ_EXPORT int odr_grow_block(odr_ecblock *b, int min_bytes);
+YAZ_EXPORT int odr_write(ODR o, unsigned char *buf, int bytes);
+YAZ_EXPORT int odr_seek(ODR o, int whence, int offset);
+YAZ_EXPORT int odr_dumpBER(FILE *f, const char *buf, int len);
+YAZ_EXPORT void odr_choice_bias(ODR o, int what);
+YAZ_EXPORT void odr_choice_enable_bias(ODR o, int mode);
+YAZ_EXPORT int odr_total(ODR o);
+YAZ_EXPORT char *odr_errmsg(int n);
+YAZ_EXPORT Odr_oid *odr_getoidbystr(ODR o, char *str);
+YAZ_EXPORT Odr_oid *odr_getoidbystr_nmem(NMEM o, char *str);
+YAZ_EXPORT int odr_initmember(ODR o, void *p, int size);
+YAZ_EXPORT int odr_peektag(ODR o, int *zclass, int *tag, int *cons);
+YAZ_EXPORT void odr_setlenlen(ODR o, int len);
+
+typedef struct Odr_external
+{
+    Odr_oid *direct_reference;       /* OPTIONAL */
+    int     *indirect_reference;     /* OPTIONAL */
+    char    *descriptor;             /* OPTIONAL */
+    int which;
+#define ODR_EXTERNAL_single 0
+#define ODR_EXTERNAL_octet 1
+#define ODR_EXTERNAL_arbitrary 2
+    union
+    {
+       Odr_any  *single_ASN1_type;
+       Odr_oct  *octet_aligned; 
+       Odr_bitmask *arbitrary;      /* we aren't really equipped for this*/
+    } u;
+} Odr_external;
+
+YAZ_EXPORT int odr_external(ODR o, Odr_external **p, int opt,
+                           const char *name);
+YAZ_EXPORT int odr_visiblestring(ODR o, char **p, int opt,
+                                const char *name);
+YAZ_EXPORT int odr_graphicstring(ODR o, char **p, int opt,
+                                const char *name);
+YAZ_EXPORT int odr_generalizedtime(ODR o, char **p, int opt,
+                                  const char *name);
+#ifdef __cplusplus
+}
+#endif
+
+#include <yaz/xmalloc.h>
+
+#endif
diff --git a/include/yaz/odr_use.h b/include/yaz/odr_use.h
new file mode 100644 (file)
index 0000000..3e3080a
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Id: odr_use.h,v 1.1 1999-11-30 13:47:11 adam Exp $
+ */
+
+#ifndef ODR_USE_H
+#define ODR_USE_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Odr_external
+{
+    Odr_oid *direct_reference;       /* OPTIONAL */
+    int     *indirect_reference;     /* OPTIONAL */
+    char    *descriptor;             /* OPTIONAL */
+    int which;
+#define ODR_EXTERNAL_single 0
+#define ODR_EXTERNAL_octet 1
+#define ODR_EXTERNAL_arbitrary 2
+    union
+    {
+       Odr_any  *single_ASN1_type;
+       Odr_oct  *octet_aligned; 
+       Odr_bitmask *arbitrary;      /* we aren't really equipped for this*/
+    } u;
+} Odr_external;
+
+YAZ_EXPORT int odr_external(ODR o, Odr_external **p, int opt,
+                           const char *name);
+YAZ_EXPORT int odr_visiblestring(ODR o, char **p, int opt,
+                                const char *name);
+YAZ_EXPORT int odr_graphicstring(ODR o, char **p, int opt,
+                                const char *name);
+YAZ_EXPORT int odr_generalizedtime(ODR o, char **p, int opt,
+                                  const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/oid.h b/include/yaz/oid.h
new file mode 100644 (file)
index 0000000..c1d3f2c
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Id: oid.h,v 1.1 1999-11-30 13:47:11 adam Exp $
+ */
+
+#ifndef OID_H
+#define OID_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define OID_SIZE 20
+    
+typedef enum oid_proto
+{
+    PROTO_NOP=0,
+    PROTO_Z3950,
+    PROTO_SR,
+    PROTO_GENERAL,
+    PROTO_WAIS
+} oid_proto;
+
+typedef enum oid_class
+{
+    CLASS_NOP=0,
+    CLASS_APPCTX,
+    CLASS_ABSYN,
+    CLASS_ATTSET,
+    CLASS_TRANSYN,
+    CLASS_DIAGSET,
+    CLASS_RECSYN,
+    CLASS_RESFORM,
+    CLASS_ACCFORM,
+    CLASS_EXTSERV,
+    CLASS_USERINFO,
+    CLASS_ELEMSPEC,
+    CLASS_VARSET,
+    CLASS_SCHEMA,
+    CLASS_TAGSET,
+    CLASS_GENERAL
+} oid_class;
+
+typedef enum oid_value
+{
+    VAL_NOP=0,
+    VAL_APDU,
+    VAL_BER,
+    VAL_BASIC_CTX,
+    VAL_BIB1,
+    VAL_EXP1,
+    VAL_EXT1,
+    VAL_CCL1,
+    VAL_GILS,
+    VAL_WAIS,
+    VAL_STAS,
+    VAL_COLLECT1,
+    VAL_CIMI1,
+    VAL_GEO,
+    VAL_DIAG1,
+    VAL_ISO2709,
+    VAL_UNIMARC,
+    VAL_INTERMARC,
+    VAL_CCF,
+    VAL_USMARC,
+    VAL_UKMARC,
+    VAL_NORMARC,
+    VAL_LIBRISMARC,
+    VAL_DANMARC,
+    VAL_FINMARC,
+    VAL_MAB,
+    VAL_CANMARC,
+    VAL_SBN,
+    VAL_PICAMARC,
+    VAL_AUSMARC,
+    VAL_IBERMARC,
+    VAL_CATMARC,
+    VAL_MALMARC,
+    VAL_EXPLAIN,
+    VAL_SUTRS,
+    VAL_OPAC,
+    VAL_SUMMARY,
+    VAL_GRS0,
+    VAL_GRS1,
+    VAL_EXTENDED,
+    VAL_FRAGMENT,
+    VAL_RESOURCE1,
+    VAL_RESOURCE2,
+    VAL_PROMPT1,
+    VAL_DES1,
+    VAL_KRB1,
+    VAL_PRESSET,
+    VAL_PQUERY,
+    VAL_PCQUERY,
+    VAL_ITEMORDER,
+    VAL_DBUPDATE0,
+    VAL_DBUPDATE,
+    VAL_EXPORTSPEC,
+    VAL_EXPORTINV,
+    VAL_NONE,
+    VAL_SETM,
+    VAL_SETG,
+    VAL_VAR1,
+    VAL_ESPEC1,
+    VAL_SOIF,
+    VAL_SEARCHRES1,
+    VAL_THESAURUS,
+    VAL_CHARLANG,
+    VAL_USERINFO1,
+    VAL_MULTISRCH1,
+    VAL_MULTISRCH2,
+    VAL_DATETIME,
+    VAL_SQLRS,
+    VAL_PDF,
+    VAL_POSTSCRIPT,
+    VAL_HTML,
+    VAL_TIFF,
+    VAL_GIF,
+    VAL_JPEG,
+    VAL_PNG,
+    VAL_MPEG,
+    VAL_SGML,
+    VAL_TIFFB,
+    VAL_WAV,
+    VAL_UPDATEES,
+    VAL_TEXT_XML,
+    VAL_APPLICATION_XML,
+    VAL_UNIVERSE_REPORT,
+    VAL_PROXY,
+    VAL_COOKIE,
+    VAL_CLIENT_IP,
+/* add new types here... */
+
+/* VAL_DYNAMIC must have highest value */
+    VAL_DYNAMIC,
+    VAL_MAX = VAL_DYNAMIC+30
+} oid_value;
+
+typedef struct oident
+{
+    oid_proto proto;
+    oid_class oclass;
+    oid_value value;
+    int oidsuffix[OID_SIZE];
+    char *desc;
+} oident;
+
+YAZ_EXPORT int *oid_getoidbyent(struct oident *ent);
+YAZ_EXPORT int *oid_ent_to_oid(struct oident *ent, int *dst);
+YAZ_EXPORT struct oident *oid_getentbyoid(int *o);
+YAZ_EXPORT void oid_oidcpy(int *t, int *s);
+YAZ_EXPORT void oid_oidcat(int *t, int *s);
+YAZ_EXPORT int oid_oidcmp(int *o1, int *o2);
+YAZ_EXPORT int oid_oidlen(int *o);
+YAZ_EXPORT oid_value oid_getvalbyname(const char *name);
+YAZ_EXPORT void oid_setprivateoids(oident *list);
+YAZ_EXPORT struct oident *oid_addent (int *oid, enum oid_proto proto,
+                                     enum oid_class oclass,
+                                     const char *desc, int value);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/options.h b/include/yaz/options.h
new file mode 100644 (file)
index 0000000..554d430
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: options.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.6  1997/09/01 08:49:50  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.5  1997/05/14 06:53:43  adam
+ * C++ support.
+ *
+ * Revision 1.4  1995/09/29 17:12:05  quinn
+ * Smallish
+ *
+ * Revision 1.3  1995/09/27  15:02:48  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.2  1995/05/16  08:50:36  quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.1  1995/03/30  09:39:42  quinn
+ * Moved .h files to include directory
+ *
+ * Revision 1.1  1995/03/27  08:35:19  quinn
+ * Created util library
+ * Added memory debugging module. Imported options-manager
+ *
+ * Revision 1.2  1994/08/16  16:16:03  adam
+ * bfile header created.
+ *
+ * Revision 1.1  1994/08/16  16:04:35  adam
+ * Added header file options.h
+ *
+ */
+
+#ifndef OPTIONS_H
+#define OPTIONS_H
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT int options (const char *desc, char **argv, int argc, char **arg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+       
diff --git a/include/yaz/otherinfo.h b/include/yaz/otherinfo.h
new file mode 100644 (file)
index 0000000..d7d6d26
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 1999, Index Data
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * $Id: otherinfo.h,v 1.1 1999-11-30 13:47:11 adam Exp $
+ */
+#ifndef OTHERINFO_H
+#define OTHERINFO_H
+
+#include <yaz/proto.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT void yaz_oi_APDU(Z_APDU *apdu, Z_OtherInformation ***oip);
+YAZ_EXPORT    Z_OtherInformationUnit *yaz_oi_update (
+    Z_OtherInformation **otherInformationP, ODR odr,
+    int *oid, int categoryValue, int delete_flag);
+YAZ_EXPORT void yaz_oi_set_string_oid (
+    Z_OtherInformation **otherInformation, ODR odr,
+    int *oid, int categoryValue,
+    const char *str);
+YAZ_EXPORT void yaz_oi_set_string_oidval (
+    Z_OtherInformation **otherInformation, ODR odr,
+    int oidval, int categoryValue,
+    const char *str);
+YAZ_EXPORT char *yaz_oi_get_string_oid (
+    Z_OtherInformation **otherInformation,
+    int *oid, int categoryValue, int delete_flag);
+YAZ_EXPORT char *yaz_oi_get_string_oidval(
+    Z_OtherInformation **otherInformation,
+    int oidval, int categoryValue, int delete_flag);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/pquery.h b/include/yaz/pquery.h
new file mode 100644 (file)
index 0000000..f0a4a53
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 1995-1996, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: pquery.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1997/09/01 08:49:50  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.7  1997/05/14 06:53:43  adam
+ * C++ support.
+ *
+ * Revision 1.6  1996/08/12 14:09:24  adam
+ * Default prefix query attribute set defined by using p_query_attset.
+ *
+ * Revision 1.5  1996/03/15  11:01:46  adam
+ * Extra argument to p_query_rpn: protocol.
+ * Extra arguments to p_query_scan: protocol and attributeSet.
+ *
+ * Revision 1.4  1995/09/29  17:12:05  quinn
+ * Smallish
+ *
+ * Revision 1.3  1995/09/27  15:02:49  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.2  1995/05/26  08:56:05  adam
+ * New function: p_query_scan.
+ *
+ * Revision 1.1  1995/05/22  15:31:05  adam
+ * New function, p_query_rpn, to convert from prefix (ascii) to rpn (asn).
+ *
+ */
+
+#ifndef PQUERY_H
+#define PQUERY_H
+
+#include <yaz/yconfig.h>
+#include <yaz/proto.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT Z_RPNQuery *p_query_rpn (ODR o, oid_proto proto, const char *qbuf);
+
+YAZ_EXPORT Z_AttributesPlusTerm *p_query_scan (ODR o, oid_proto proto,
+           Odr_oid **attributeSetP, const char *qbuf);
+YAZ_EXPORT int p_query_attset (const char *arg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-acc.h b/include/yaz/prt-acc.h
new file mode 100644 (file)
index 0000000..6e500a4
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: prt-acc.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.9  1999/04/20 09:56:48  adam
+ * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
+ * Modified all encoders/decoders to reflect this change.
+ *
+ * Revision 1.8  1997/09/01 08:49:51  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.7  1997/05/14 06:53:46  adam
+ * C++ support.
+ *
+ * Revision 1.6  1996/01/02 08:57:35  quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.5  1995/09/29  17:12:09  quinn
+ * Smallish
+ *
+ * Revision 1.4  1995/09/27  15:02:49  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.3  1995/08/17  12:45:16  quinn
+ * Fixed minor problems with GRS-1. Added support in c&s.
+ *
+ * Revision 1.2  1995/08/15  12:00:13  quinn
+ * Updated External
+ *
+ * Revision 1.1  1995/06/02  09:49:49  quinn
+ * Add access control
+ *
+ *
+ */
+
+#ifndef PRT_ACC_H
+#define PRT_ACC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Z_Encryption1
+{
+    Odr_oct *cryptType;       /* OPTIONAL */
+    Odr_oct *credential;      /* OPTIONAL */
+    Odr_oct *data;
+} Z_Encryption1;
+
+typedef struct Z_EnumeratedPrompt1
+{
+    int *type;
+#define Z_Prompt1_groupId        0
+#define Z_Prompt1_userId         1
+#define Z_Prompt1_password       2
+#define Z_Prompt1_newPassword    3
+#define Z_Prompt1_copyright      4
+    char *suggestedString;       /* OPTIONAL */
+} Z_EnumeratedPrompt1;
+
+typedef struct Z_PromptId1
+{
+    int which;
+#define Z_PromptId1_enumeratedPrompt 0
+#define Z_PromptId1_nonEnumeratedPrompt 1
+    union
+    {
+       Z_EnumeratedPrompt1 *enumeratedPrompt;
+       char *nonEnumeratedPrompt;
+    } u;
+} Z_PromptId1;
+
+typedef struct Z_PromptInfo1
+{
+    int which;
+#define Z_Challenge1_character 0
+#define Z_Challenge1_encrypted 1
+    union
+    {
+       char *character;
+       Z_Encryption1 *encrypted;
+    } u;
+} Z_PromptInfo1;
+
+typedef struct Z_ChallengeUnit1
+{
+    Z_PromptId1 *promptId;
+    char *defaultResponse;           /* OPTIONAL */
+    Z_PromptInfo1 *promptInfo;       /* OPTIONAL */
+    char *regExpr;                   /* OPTIONAL */
+    Odr_null *responseRequired;      /* OPTIONAL */
+    int num_values;
+    char **allowedValues;            /* OPTIONAL */
+    Odr_null *shouldSave;            /* OPTIONAL */
+    int *dataType;                   /* OPTIONAL */
+#define Z_ChalDataType_integer       1
+#define Z_ChalDataType_date          2
+#define Z_ChalDataType_float         3
+#define Z_ChalDataType_alphaNumeric  4
+#define Z_ChalDataType_urlUrn        5
+#define Z_ChalDataType_boolean       6
+    Z_External *diagnostic;        /* OPTIONAL */
+} Z_ChallengeUnit1;
+
+typedef struct Z_Challenge1
+{
+    int num_challenges;
+    Z_ChallengeUnit1 **list;
+} Z_Challenge1;
+
+typedef struct Z_ResponseUnit1
+{
+    Z_PromptId1 *promptId;
+    int which;
+#define Z_Response1_string 0
+#define Z_Response1_accept 1
+#define Z_Response1_acknowledge 2
+#define Z_Response1_diagnostic 3
+#define Z_Response1_encrypted 4
+    union
+    {
+       char *string;
+       bool_t *accept;
+       Odr_null *acknowledge;
+       Z_DiagRec *diagnostic;
+       Z_Encryption1 *encrypted;
+    } u;
+} Z_ResponseUnit1;
+
+typedef struct Z_Response1
+{
+    int num_responses;
+    Z_ResponseUnit1 **list;
+} Z_Response1;
+
+typedef struct Z_PromptObject1
+{
+    int which;
+#define Z_PromptObject1_challenge 0
+#define Z_PromptObject1_response 1
+    union
+    {
+       Z_Challenge1 *challenge;
+       Z_Response1 *response;
+    } u;
+} Z_PromptObject1;
+
+YAZ_EXPORT int z_PromptObject1(ODR o, Z_PromptObject1 **p, int opt,
+                              const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-add.h b/include/yaz/prt-add.h
new file mode 100644 (file)
index 0000000..2e31638
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: prt-add.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.4  1999/04/20 09:56:48  adam
+ * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
+ * Modified all encoders/decoders to reflect this change.
+ *
+ * Revision 1.3  1997/05/14 06:53:46  adam
+ * C++ support.
+ *
+ * Revision 1.2  1997/04/30 08:52:09  quinn
+ * Null
+ *
+ * Revision 1.1  1996/10/10  11:51:58  quinn
+ * Added SerchResult additional info
+ *
+ *
+ */
+
+#ifndef PRT_ADD_H
+#define PRT_ADD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Z_QueryExpressionTerm
+{
+    Z_Term *queryTerm;
+    char *termComment;              /* OPTIONAL */
+} Z_QueryExpressionTerm;
+
+typedef struct Z_QueryExpression
+{
+    int which;
+#define Z_QueryExpression_term 1
+#define Z_QueryExpression_query 2
+    union {
+       Z_QueryExpressionTerm *term;
+       Z_Query *query;
+    } u;
+} Z_QueryExpression;
+
+typedef struct Z_ResultsByDBList
+{
+    int num;
+    Z_DatabaseName **elements;
+} Z_ResultsByDBList;
+
+typedef struct Z_ResultsByDB_elem
+{
+    int which;
+#define Z_ResultsByDB_all 1
+#define Z_ResultsByDB_list 2
+    union {
+        Odr_null *all;
+        Z_ResultsByDBList *list;
+    } u;
+    int *count;                           /* OPTIONAL */
+    char *resultSetName; /* OPTIONAL */
+} Z_ResultsByDB_elem;
+
+typedef struct Z_ResultsByDB
+{
+    int num;
+    Z_ResultsByDB_elem **elements;
+} Z_ResultsByDB;
+
+typedef struct Z_SearchInfoReport_elem
+{
+    char *subqueryId;                          /* OPTIONAL */
+    bool_t *fullQuery;
+    Z_QueryExpression *subqueryExpression;     /* OPTIONAL */
+    Z_QueryExpression *subqueryInterpretation; /* OPTIONAL */
+    Z_QueryExpression *subqueryRecommendation; /* OPTIONAL */
+    int *subqueryCount;                        /* OPTIONAL */
+    Z_IntUnit *subqueryWeight;                 /* OPTIONAL */
+    Z_ResultsByDB *resultsByDB;                /* OPTIONAL */
+} Z_SearchInfoReport_elem;
+
+typedef struct Z_SearchInfoReport
+{
+    int num;
+    Z_SearchInfoReport_elem **elements;
+} Z_SearchInfoReport;
+
+int z_SearchInfoReport (ODR o, Z_SearchInfoReport **p, int opt,
+                       const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-arc.h b/include/yaz/prt-arc.h
new file mode 100644 (file)
index 0000000..df159c7
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 1995,1996 Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef PRT_ARC_H
+#define PRT_ARC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ------------------- Summary Record --------------------- */
+
+typedef struct Z_FormatSpec
+{
+    char *type;
+    int *size;                    /* OPTIONAL */
+    int *bestPosn;                /* OPTIONAL */
+} Z_FormatSpec;
+
+typedef struct Z_BriefBib
+{
+    char *title;
+    char *author;                  /* OPTIONAL */
+    char *callNumber;              /* OPTIONAL */
+    char *recordType;              /* OPTIONAL */
+    char *bibliographicLevel;      /* OPTIONAL */
+    int num_format;
+    Z_FormatSpec **format;         /* OPTIONAL */
+    char *publicationPlace;        /* OPTIONAL */
+    char *publicationDate;         /* OPTIONAL */
+    char *targetSystemKey;         /* OPTIONAL */
+    char *satisfyingElement;       /* OPTIONAL */
+    int *rank;                     /* OPTIONAL */
+    char *documentId;              /* OPTIONAL */
+    char *abstract;                /* OPTIONAL */
+    Z_OtherInformation *otherInfo; /* OPTIONAL */
+} Z_BriefBib;
+
+/* ------------------- OPAC Record --------------------- */
+
+typedef struct Z_CircRecord
+{
+    bool_t *availableNow;
+    char *availabilityDate;        /* OPTIONAL */
+    char *availableThru;           /* OPTIONAL */
+    char *restrictions;            /* OPTIONAL */
+    char *itemId;                  /* OPTIONAL */
+    bool_t *renewable;
+    bool_t *onHold;
+    char *enumAndChron;            /* OPTIONAL */
+    char *midspine;                /* OPTIONAL */
+    char *temporaryLocation;       /* OPTIONAL */
+} Z_CircRecord;
+
+typedef struct Z_Volume
+{
+    char *enumeration;             /* OPTIONAL */
+    char *chronology;              /* OPTIONAL */
+    char *enumAndChron;            /* OPTIONAL */
+} Z_Volume;
+
+typedef struct Z_HoldingsAndCircData
+{
+    char *typeOfRecord;            /* OPTIONAL */
+    char *encodingLevel;           /* OPTIONAL */
+    char *format;                  /* OPTIONAL */
+    char *receiptAcqStatus;        /* OPTIONAL */
+    char *generalRetention;        /* OPTIONAL */
+    char *completeness;            /* OPTIONAL */
+    char *dateOfReport;            /* OPTIONAL */
+    char *nucCode;                 /* OPTIONAL */
+    char *localLocation;           /* OPTIONAL */
+    char *shelvingLocation;        /* OPTIONAL */
+    char *callNumber;              /* OPTIONAL */
+    char *shelvingData;            /* OPTIONAL */
+    char *copyNumber;              /* OPTIONAL */
+    char *publicNote;              /* OPTIONAL */
+    char *reproductionNote;        /* OPTIONAL */
+    char *termsUseRepro;           /* OPTIONAL */
+    char *enumAndChron;            /* OPTIONAL */
+    int num_volumes;
+    Z_Volume **volumes;            /* OPTIONAL */
+    int num_circulationData;
+    Z_CircRecord **circulationData;/* OPTIONAL */
+} Z_HoldingsAndCircData;
+
+typedef struct Z_HoldingsRecord
+{
+    int which;
+#define Z_HoldingsRecord_marcHoldingsRecord    0
+#define Z_HoldingsRecord_holdingsAndCirc       1
+    union
+    {
+       Z_External *marcHoldingsRecord;
+       Z_HoldingsAndCircData *holdingsAndCirc;
+    } u;
+} Z_HoldingsRecord;
+
+typedef struct Z_OPACRecord
+{
+    Z_External *bibliographicRecord;   /* OPTIONAL */
+    int num_holdingsData;
+    Z_HoldingsRecord **holdingsData;   /* OPTIONAL */
+} Z_OPACRecord;
+
+YAZ_EXPORT int z_BriefBib(ODR o, Z_BriefBib **p, int opt, const char *name);
+YAZ_EXPORT int z_OPACRecord(ODR o, Z_OPACRecord **p, int opt,
+                           const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-dat.h b/include/yaz/prt-dat.h
new file mode 100644 (file)
index 0000000..a336ed1
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * This file is part of the YAZ toolkit:
+ * Copyright (c) 1998, Index Data.
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * Contribution by Ronald van Der Meer (RVDM):
+ *  Databasix Information Systems B.V., Utrecht, The Netherlands.
+ *
+ * $Log: prt-dat.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1999/04/20 09:56:48  adam
+ * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
+ * Modified all encoders/decoders to reflect this change.
+ *
+ * Revision 1.1  1998/02/10 15:31:52  adam
+ * Implemented date and time structure. Changed the Update Extended
+ * Service.
+ *
+ */
+
+#ifndef __PRT_DAT_H
+#define __PRT_DAT_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Z_MonthAndDay
+{
+    int *month;
+    int *day;                               /* OPTIONAL */
+} Z_MonthAndDay;
+
+typedef struct Z_Quarter
+{
+    int which;
+#define Z_Quarter_first                0
+#define Z_Quarter_second       1
+#define Z_Quarter_third                2
+#define Z_Quarter_fourth       3
+    union
+    {
+       Odr_null *first;
+       Odr_null *second;
+       Odr_null *third;
+       Odr_null *fourth;
+    } u;
+} Z_Quarter;
+
+typedef struct Z_Season
+{
+    int which;
+#define Z_Season_winter                0
+#define Z_Season_spring                1
+#define Z_Season_summer                2
+#define Z_Season_autumn                3
+    union
+    {
+       Odr_null *winter;
+       Odr_null *spring;
+       Odr_null *summer;
+       Odr_null *autumn;
+    } u;
+} Z_Season;
+
+typedef struct Z_PartOfYear
+{
+    int which;
+#define Z_PartOfYear_monthAndDay       0
+#define Z_PartOfYear_julianDay         1
+#define Z_PartOfYear_weekNumber                2
+#define Z_PartOfYear_quarter           3
+#define Z_PartOfYear_season            4
+    union
+    {
+       Z_MonthAndDay *monthAndDay;
+       int *julianDay; 
+       int *weekNumber; 
+       Z_Quarter *quarter;
+       Z_Season *season;
+    } u;
+} Z_PartOfYear;
+
+typedef struct Z_Era
+{
+    int which;
+#define Z_Era_decade           0
+#define Z_Era_century          1
+#define Z_Era_millennium       2
+    union
+    {
+       Odr_null *decade;
+       Odr_null *century;
+       Odr_null *millennium;
+    } u;
+} Z_Era;
+
+typedef struct Z_DateFlags
+{
+    Odr_null *circa;                        /* OPTIONAL */
+    Z_Era *era;                             /* OPTIONAL */
+} Z_DateFlags;
+
+typedef struct Z_Date
+{
+    int *year;
+    Z_PartOfYear *partOfYear;               /* OPTIONAL */
+    Z_DateFlags *flags;                     /* OPTIONAL */
+} Z_Date;
+
+typedef struct Z_Zone
+{
+    int which;
+#define Z_Zone_local           0
+#define Z_Zone_utc             1
+#define Z_Zone_utcOffset       2
+    union
+    {
+       Odr_null *local;
+       Odr_null *utc;
+       int *utcOffset;
+    } u;
+} Z_Zone;
+
+typedef struct Z_Time
+{
+    int *hour;
+    int *minute;                            /* OPTIONAL */
+    int *second;                            /* OPTIONAL */
+    Z_IntUnit *partOfSecond;                /* OPTIONAL */
+    Z_Zone *zone;                           /* OPTIONAL */
+} Z_Time;
+
+typedef struct Z_DateTime
+{
+    Z_Date *z3950Date;                      /* OPTIONAL */
+    Z_Time *z3950Time;                      /* OPTIONAL */
+} Z_DateTime;
+
+YAZ_EXPORT int z_DateTime(ODR o, Z_DateTime **p, int opt, const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-dia.h b/include/yaz/prt-dia.h
new file mode 100644 (file)
index 0000000..88dc8a0
--- /dev/null
@@ -0,0 +1,333 @@
+/*
+ * Copyright (c) 1995-1998, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef PRT_DIA_H
+#define PRT_DIA_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Z_TooMany
+{
+    int *tooManyWhat;
+#define Z_TooMany_argumentWords        1
+#define Z_TooMany_truncatedWords       2
+#define Z_TooMany_booleanOperators     3
+#define Z_TooMany_incompleteSubfields  4
+#define Z_TooMany_characters           5
+#define Z_TooMany_recordsRetrieved     6
+#define Z_TooMany_databasesSpecified   7
+#define Z_TooMany_resultSetsCreated    8
+#define Z_TooMany_indexTermsProcessed  9
+    int *max;                    /* OPTIONAL */
+} Z_TooMany;
+
+typedef struct Z_BadSpec
+{
+    Z_Specification *spec;
+    char *db;                    /* OPTIONAL */
+    int num_goodOnes;
+    Z_Specification **goodOnes;  /* OPTIONAL */
+} Z_BadSpec;
+
+typedef struct Z_DbUnavailWhy
+{
+    int *reasonCode;             /* OPTIONAL */
+#define Z_DbUnavail_doesNotExist         0
+#define Z_DbUnavail_existsButUnavail     1
+#define Z_DbUnavail_locked               2
+#define Z_DbUnavail_accessDenied         3
+    char *message;               /* OPTIONAL */
+} Z_DbUnavailWhy;
+
+typedef struct Z_DbUnavail
+{
+    char *db;
+    Z_DbUnavailWhy *why;         /* OPTIONAL */
+} Z_DbUnavail;
+
+typedef struct Z_Attribute
+{
+    Odr_oid *id;
+    int *type;                   /* OPTIONAL */
+    int *value;                  /* OPTIONAL */
+    Z_Term *term;                /* OPTIONAL */
+} Z_Attribute;
+
+typedef struct Z_AttCombo
+{
+    Z_AttributeList *unsupportedCombination;
+    int num_alternatives;
+    Z_AttributeList **alternatives;    /* OPTIONAL */
+} Z_AttCombo;
+
+typedef struct Z_DiagTerm 
+{
+    int *problem;                /* OPTIONAL */
+#define Z_DiagtermProb_codedValue     1
+#define Z_DiagtermProb_unparsable     2
+#define Z_DiagtermProb_tooShort       3
+#define Z_DiagtermProb_type           4
+    Z_Term *term;
+} Z_DiagTerm;
+
+typedef struct Z_Proximity
+{
+    int which;
+#define Z_Proximity_resultSets 0
+#define Z_Proximity_badSet 1
+#define Z_Proximity_relation 2
+#define Z_Proximity_unit 3
+#define Z_Proximity_distance 4
+#define Z_Proximity_attributes 5
+#define Z_Proximity_ordered 6
+#define Z_Proximity_exclusion 7
+    union
+    {
+       Odr_null *resultSets;
+       char *badSet;
+       int *relation;
+       int *unit;
+       int *distance;
+       Z_AttributeList *attributes;
+       Odr_null *ordered;
+       Odr_null *exclusion;
+    } u;
+} Z_Proximity;
+
+typedef struct Z_AttrListList
+{
+    int num_lists;
+    Z_AttributeList *lists;
+} Z_AttrListList;
+
+typedef struct Z_Scan
+{
+    int which;
+#define Z_ScanD_nonZeroStepSize 0
+#define Z_ScanD_specifiedStepSize 1
+#define Z_ScanD_termList1 2
+#define Z_ScanD_termList2 3
+#define Z_ScanD_posInResponse 4
+#define Z_ScanD_resources 5
+#define Z_ScanD_endOfList 6
+    union
+    {
+       Odr_null *nonZeroStepSize;
+       Odr_null *specifiedStepSize;
+       Odr_null *termList1;
+       Z_AttrListList *termList2;
+       int *posInResponse;
+#define Z_ScanPosInRsp_mustBeOne         1
+#define Z_ScanPosInRsp_mustBePositive    2
+#define Z_ScanPosInRsp_mustBeNonNegative 3
+#define Z_ScanPosInRsp_other             4
+       Odr_null *resources;
+       Odr_null *endOfList;
+    } u;
+} Z_Scan;
+
+typedef struct Z_Sort
+{
+    int which;
+#define Z_SortD_sequence 0
+#define Z_SortD_noRsName 1
+#define Z_SortD_tooMany 2
+#define Z_SortD_incompatible 3
+#define Z_SortD_generic 4
+#define Z_SortD_dbSpecific 5
+#define Z_SortD_sortElement 6
+#define Z_SortD_key 7
+#define Z_SortD_action 8
+#define Z_SortD_illegal 9
+#define Z_SortD_inputTooLarge 10
+#define Z_SortD_aggregateTooLarge 11
+    union
+    {
+       Odr_null *sequence;
+       Odr_null *noRsName;
+       int *tooMany;
+       Odr_null *incompatible;
+       Odr_null *generic;
+       Odr_null *dbSpecific;
+       int *key;
+#define Z_SortKey_tooMany       1
+#define Z_SortKey_duplicate     2
+       Odr_null *action;
+       int *illegal;
+#define Z_SortIllegal_relation  1
+#define Z_SortIllegal_case      2
+#define Z_SortIllegal_action    3
+#define Z_SortIllegal_sort      4
+       Z_StringList *inputTooLarge;
+       Odr_null *aggregateTooLarge;
+    } u;
+} Z_Sort;
+
+typedef struct Z_Segmentation
+{
+    int which;
+#define Z_SegmentationD_segments 0
+    union
+    {
+       Odr_null *segments;
+    } u;
+} Z_Segmentation;
+
+typedef struct Z_ExtServices
+{
+    int which;
+#define Z_ExtServicesD_req 0
+#define Z_ExtServicesD_permission 1
+#define Z_ExtServicesD_immediate 2
+    union
+    {
+       int *req;
+#define Z_ExtSrvReq_nameInUse           1
+#define Z_ExtSrvReq_noSuchname          2
+#define Z_ExtSrvReq_quota               3
+#define Z_ExtSrvReq_type                4
+       int *permission;
+#define Z_ExtSrvPerm_id                 1
+#define Z_ExtSrvPerm_modifyDelete       2
+       int *immediate;
+#define Z_ExtSrvImm_failed              1
+#define Z_ExtSrvImm_service             2
+#define Z_ExtSrvImm_parameters          3
+    } u;
+} Z_ExtServices;
+
+typedef struct Z_OidList
+{
+    int num_oids;
+    Odr_oid **oids;
+} Z_OidList;
+
+typedef struct Z_AccessCtrl
+{
+    int which;
+#define Z_AccessCtrlD_noUser 0
+#define Z_AccessCtrlD_refused 1
+#define Z_AccessCtrlD_simple 2
+#define Z_AccessCtrlD_oid 3
+#define Z_AccessCtrlD_alternative 4
+#define Z_AccessCtrlD_pwdInv 5
+#define Z_AccessCtrlD_pwdExp 6
+    union
+    {
+       Odr_null *noUser;
+       Odr_null *refused;
+       Odr_null *simple;
+       Z_OidList *oid;
+       Z_OidList *alternative;
+       Odr_null *pwdInv;
+       Odr_null *pwdExp;
+    } u;
+} Z_AccessCtrl;
+
+typedef struct Z_RecordSyntax
+{
+    Odr_oid *unsupportedSyntax;
+    int num_suggestedAlternatives;           /* OPTIONAL */
+    Odr_oid **suggestedAlternatives;           /* OPTIONAL */
+} Z_RecordSyntax;
+
+typedef struct Z_DiagFormat
+{
+    int which;
+#define Z_DiagFormat_tooMany 0
+#define Z_DiagFormat_badSpec 1
+#define Z_DiagFormat_dbUnavail 2
+#define Z_DiagFormat_unSupOp 3
+#define Z_DiagFormat_attribute 4
+#define Z_DiagFormat_attCombo 5
+#define Z_DiagFormat_term 6
+#define Z_DiagFormat_proximity 7
+#define Z_DiagFormat_scan 8
+#define Z_DiagFormat_sort 9
+#define Z_DiagFormat_segmentation 10
+#define Z_DiagFormat_extServices 11
+#define Z_DiagFormat_accessCtrl 12
+#define Z_DiagFormat_recordSyntax 13
+    union
+    {
+       Z_TooMany *tooMany;
+       Z_BadSpec *badSpec;
+       Z_DbUnavail *dbUnavail;
+       int *unSupOp;
+#define Z_UnSupOp_and             0
+#define Z_UnSupOp_or              1
+#define Z_UnSupOp_and_not         2
+#define Z_UnSupOp_prox            3
+       Z_Attribute *attribute;
+       Z_AttributeList *attCombo;
+       Z_DiagTerm *term;
+       Z_Proximity *proximity;
+       Z_Scan *scan;
+       Z_Sort *sort;
+       Z_Segmentation *segmentation;
+       Z_ExtServices *extServices;
+       Z_AccessCtrl *accessCtrl;
+       Z_RecordSyntax *recordSyntax;
+    } u;
+} Z_DiagFormat;
+
+typedef struct Z_Diagnostic
+{
+    int which;
+#define Z_Diagnostic_defaultDiagRec 0
+#define Z_Diagnostic_explicitDiagnostic 1
+    union 
+    {
+       Z_DefaultDiagFormat *defaultDiagRec;
+       Z_DiagFormat *explicitDiagnostic;
+    } u;
+} Z_Diagnostic;
+
+typedef struct Z_DiagnosticUnit
+{
+    Z_Diagnostic *diagnostic;                    /* OPTIONAL */
+    char *message;                               /* OPTIONAL */
+} Z_DiagnosticUnit;
+
+typedef struct Z_DiagnosticFormat
+{
+    int num_diagnostics;
+    Z_DiagnosticUnit **diagnostics;
+} Z_DiagnosticFormat;
+
+YAZ_EXPORT int z_DiagnosticFormat(ODR o, Z_DiagnosticFormat **p, int opt,
+                                 const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-esp.h b/include/yaz/prt-esp.h
new file mode 100644 (file)
index 0000000..86bf403
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef PRT_ESP_H
+#define PRT_ESP_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Z_OccurValues
+{
+    int *start;
+    int *howMany;                     /* OPTIONAL */
+} Z_OccurValues;
+
+typedef struct Z_Occurrences
+{
+    int which;
+#define Z_Occurrences_all 0
+#define Z_Occurrences_last 1
+#define Z_Occurrences_values 2
+    union
+    {
+       Odr_null *all;
+       Odr_null *last;
+       Z_OccurValues *values;
+    } u;
+} Z_Occurrences;
+
+typedef struct Z_SpecificTag
+{
+    Odr_oid *schemaId;                      /* OPTIONAL */
+    int *tagType;                           /* OPTIONAL */
+    Z_StringOrNumeric *tagValue;
+    Z_Occurrences *occurrences;             /* OPTIONAL */
+} Z_SpecificTag;
+
+typedef struct Z_ETagUnit
+{
+    int which;
+#define Z_ETagUnit_specificTag 0
+#define Z_ETagUnit_wildThing 1
+#define Z_ETagUnit_wildPath 2
+    union
+    {
+       Z_SpecificTag *specificTag;
+       Z_Occurrences *wildThing;
+       Odr_null *wildPath;
+    } u;
+} Z_ETagUnit;
+
+typedef struct Z_ETagPath
+{
+    int num_tags;
+    Z_ETagUnit **tags;
+} Z_ETagPath;
+
+typedef struct Z_SimpleElement
+{
+    Z_ETagPath *path;
+    Z_Variant *variantRequest;           /* OPTIONAL */
+} Z_SimpleElement;
+
+typedef struct Z_CompoPrimitives
+{
+    int num_primitives;
+    char **primitives;
+} Z_CompoPrimitives;
+
+typedef struct Z_CompoSpecs
+{
+    int num_specs;
+    Z_SimpleElement **specs;
+} Z_CompoSpecs;
+
+typedef struct Z_CompositeElement
+{
+    int which;
+#define Z_CompoElement_primitives 0
+#define Z_CompoElement_specs 1
+    union
+    {
+       Z_CompoPrimitives *primitives;
+       Z_CompoSpecs *specs;
+    } elementList;
+    Z_ETagPath *deliveryTag;
+    Z_Variant *variantRequest;
+} Z_CompositeElement;
+
+typedef struct Z_ElementRequest
+{
+    int which;
+#define Z_ERequest_simpleElement 0
+#define Z_ERequest_compositeElement 1
+    union
+    {
+       Z_SimpleElement *simpleElement;
+       Z_CompositeElement *compositeElement;
+    } u;
+} Z_ElementRequest;
+
+typedef struct Z_Espec1
+{
+    int num_elementSetNames;
+    char **elementSetNames;               /* OPTIONAL */
+    Odr_oid *defaultVariantSetId;         /* OPTIONAL */
+    Z_Variant *defaultVariantRequest;     /* OPTIONAL */
+    int *defaultTagType;                  /* OPTIONAL */
+    int num_elements;
+    Z_ElementRequest **elements;           /* OPTIONAL */
+} Z_Espec1;
+
+YAZ_EXPORT int z_Espec1(ODR o, Z_Espec1 **p, int opt, const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-exd.h b/include/yaz/prt-exd.h
new file mode 100644 (file)
index 0000000..d5b1a2a
--- /dev/null
@@ -0,0 +1,268 @@
+/*
+ * Copyright (c) 1995-1998, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef PRT_EXD_H
+#define PRT_EXD_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Z_TaskPackage
+{
+    Odr_oid *packageType;                 
+    char *packageName;                      /* OPTIONAL */
+    char *userId;                           /* OPTIONAL */
+    Z_IntUnit *retentionTime;               /* OPTIONAL */
+    Z_Permissions *permissions;             /* OPTIONAL */
+    char *description;                      /* OPTIONAL */
+    Odr_oct *targetReference;             
+    char *creationDateTime;    /* OPTIONAL */
+    int *taskStatus;                      
+#define Z_TaskPackage_pending             0
+#define Z_TaskPackage_active              1
+#define Z_TaskPackage_complete            2
+#define Z_TaskPackage_aborted             3
+    int num_packageDiagnostics;
+    Z_DiagRec **packageDiagnostics;         /* OPTIONAL */
+    Z_External *taskSpecificParameters;   
+} Z_TaskPackage;
+
+int z_TaskPackage(ODR o, Z_TaskPackage **p, int opt, const char *name);
+
+/* ----------------------- ITEM ORDER ------------------------- */
+
+typedef struct Z_IOTargetPart
+{
+    Z_External *itemRequest;                   /* OPTIONAL */
+    Z_External *statusOrErrorReport;
+    int *auxiliaryStatus;                      /* OPTIONAL */
+#define Z_IOTargetPart_notReceived        1
+#define Z_IOTargetPart_loanQueue          2
+#define Z_IOTargetPart_forwarded          3
+#define Z_IOTargetPart_unfilledCopyright  4
+#define Z_IOTargetPart_filledCopyright    1
+} Z_IOTargetPart;
+
+typedef struct Z_IOResultSetItem
+{
+    char *resultSetId;
+    int *item;
+} Z_IOResultSetItem;
+
+typedef struct Z_IOOriginPartNotToKeep
+{
+    Z_IOResultSetItem *resultSetItem;          /* OPTIONAL */
+    Z_External *itemRequest;                   /* OPTIONAL */
+} Z_IOOriginPartNotToKeep;
+
+typedef struct Z_IOContact
+{
+    char *name;                                /* OPTIONAL */
+    char *phone;                               /* OPTIONAL */
+    char *email;                               /* OPTIONAL */
+} Z_IOContact;
+
+typedef struct Z_IOCreditCardInfo
+{
+    char *nameOnCard;
+    char *expirationDate;
+    char *cardNumber;
+} Z_IOCreditCardInfo;
+
+typedef struct Z_IOBilling
+{
+    int which;
+#define Z_IOBilling_billInvoice 0
+#define Z_IOBilling_prepay 1
+#define Z_IOBilling_depositAccount 2
+#define Z_IOBilling_creditCard 3
+#define Z_IOBilling_cardInfoPreviouslySupplied 4
+#define Z_IOBilling_privateKnown 5
+#define Z_IOBilling_privateNotKnown 6
+    union
+    {
+       Odr_null *noinfo;
+       Z_IOCreditCardInfo *creditCard;
+       Z_External *privateNotKnown;
+    } paymentMethod;
+    char *customerReference;                        /* OPTIONAL */
+    char *customerPONumber;                         /* OPTIONAL */
+} Z_IOBilling;
+
+typedef struct Z_IOOriginPartToKeep
+{
+    Z_External *supplDescription;              /* OPTIONAL */
+    Z_IOContact *contact;                      /* OPTIONAL */
+    Z_IOBilling *addlBilling;                  /* OPTIONAL */
+} Z_IOOriginPartToKeep;
+
+typedef struct Z_IORequest
+{
+    Z_IOOriginPartToKeep *toKeep;              /* OPTIONAL */
+    Z_IOOriginPartNotToKeep *notToKeep;
+} Z_IORequest;
+
+typedef struct Z_IOTaskPackage
+{
+    Z_IOOriginPartToKeep *originPart;          /* OPTIONAL */
+    Z_IOTargetPart *targetPart;
+} Z_IOTaskPackage;
+
+typedef struct Z_ItemOrder
+{
+    int which;
+#define Z_ItemOrder_esRequest 0
+#define Z_ItemOrder_taskPackage 1
+    union
+    {
+       Z_IORequest *esRequest;
+       Z_IOTaskPackage *taskPackage;
+    } u;
+} Z_ItemOrder;
+
+int z_ItemOrder(ODR o, Z_ItemOrder **p, int opt, const char *name);
+
+/* ----------------------- ITEM UPDATE ------------------------ */
+
+typedef struct Z_IUSuppliedRecordsId
+{
+    int which;
+#define Z_IUSuppliedRecordsId_timeStamp 1
+#define Z_IUSuppliedRecordsId_versionNumber 2
+#define Z_IUSuppliedRecordsId_previousVersion 3
+    union {
+        char *timeStamp;
+        char *versionNumber;
+        Odr_external *previousVersion;
+    } u;
+} Z_IUSuppliedRecordsId;
+
+typedef struct Z_IUCorrelationInfo
+{
+    char *note; /* OPTIONAL */
+    int *id; /* OPTIONAL */
+} Z_IUCorrelationInfo;
+
+typedef struct Z_IUSuppliedRecords_elem
+{
+    int which;
+#define Z_IUSuppliedRecords_number 1
+#define Z_IUSuppliedRecords_string 2
+#define Z_IUSuppliedRecords_opaque 3
+    union {
+        int *number;
+        char *string;
+        Odr_oct *opaque;
+    } u; /* OPTIONAL */
+    Z_IUSuppliedRecordsId *supplementalId; /* OPTIONAL */
+    Z_IUCorrelationInfo *correlationInfo;    /* OPTIONAL */
+    Z_External *record;
+} Z_IUSuppliedRecords_elem;
+
+typedef struct Z_IUSuppliedRecords
+{
+    int num;
+    Z_IUSuppliedRecords_elem **elements;
+} Z_IUSuppliedRecords;
+
+typedef struct Z_IUOriginPartToKeep
+{
+    int *action;
+#define Z_IUOriginPartToKeep_recordInsert 1
+#define Z_IUOriginPartToKeep_recordReplace 2
+#define Z_IUOriginPartToKeep_recordDelete 3
+#define Z_IUOriginPartToKeep_elementUpdate 4
+#define Z_IUOriginPartToKeep_specialUpdate 5
+    char *databaseName;
+    Odr_oid *schema;               /* OPTIONAL */
+    char *elementSetName;          /* OPTIONAL */
+    Odr_external *actionQualifier; /* OPTIONAL */
+} Z_IUOriginPartToKeep;
+
+typedef struct Z_IUTaskPackageRecordStructure
+{
+    int which;
+#define Z_IUTaskPackageRecordStructure_record 1
+#define Z_IUTaskPackageRecordStructure_surrogateDiagnostics 2
+    union {
+        Odr_external *record;
+        Z_DiagRecs *surrogateDiagnostics;
+    } u; /* OPTIONAL */
+    Z_IUCorrelationInfo *correlationInfo; /* OPTIONAL */
+    int *recordStatus;
+#define Z_IUTaskPackageRecordStructureS_success 1
+#define Z_IUTaskPackageRecordStructureS_queued 2
+#define Z_IUTaskPackageRecordStructureS_inProcess 3
+#define Z_IUTaskPackageRecordStructureS_failure 4
+    Z_DiagRecs *supplementalDiagnostics;  /* OPTIONAL */
+} Z_IUTaskPackageRecordStructure;
+
+typedef struct Z_IUTargetPart
+{
+    int *updateStatus;
+#define Z_IUTargetPart_success 1
+#define Z_IUTargetPart_partial 2
+#define Z_IUTargetPart_failure 3
+    int num_globalDiagnostics;
+    Z_DiagRec **globalDiagnostics; /* OPTIONAL */
+    int num_taskPackageRecords;
+    Z_IUTaskPackageRecordStructure **taskPackageRecords;
+} Z_IUTargetPart;
+
+typedef struct Z_IUUpdateEsRequest
+{
+    Z_IUOriginPartToKeep *toKeep;
+    Z_IUSuppliedRecords *notToKeep;
+} Z_IUUpdateEsRequest;
+
+typedef struct Z_IUUpdateTaskPackage
+{
+    Z_IUOriginPartToKeep *originPart;
+    Z_IUTargetPart *targetPart;
+} Z_IUUpdateTaskPackage;
+
+typedef struct Z_IUUpdate
+{
+    int which;
+#define Z_IUUpdate_esRequest 1
+#define Z_IUUpdate_taskPackage 2
+    union {
+        Z_IUUpdateEsRequest *esRequest;
+        Z_IUUpdateTaskPackage *taskPackage;
+    } u;
+} Z_IUUpdate;
+
+YAZ_EXPORT int z_IUUpdate(ODR o, Z_IUUpdate **p, int opt, const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-exp.h b/include/yaz/prt-exp.h
new file mode 100644 (file)
index 0000000..14240a0
--- /dev/null
@@ -0,0 +1,1017 @@
+/*
+ * Copyright (c) 1995-1998, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef PRT_EXP_H
+#define PRT_EXP_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct Z_CommonInfo
+{
+    char *dateAdded;           /* OPTIONAL */
+    char *dateChanged;         /* OPTIONAL */
+    char *expiry;              /* OPTIONAL */
+    char *humanStringLanguage;    /* OPTIONAL */
+    Z_OtherInformation *otherInfo;          /* OPTIONAL */
+} Z_CommonInfo;
+
+typedef struct Z_HumanStringUnit
+{
+    char *language;               /* OPTIONAL */
+    char *text;
+} Z_HumanStringUnit;
+
+typedef struct Z_HumanString
+{
+    int num_strings;
+    Z_HumanStringUnit **strings;
+} Z_HumanString;
+
+typedef struct Z_IconObjectUnit
+{
+    int which;
+#define Z_IconObjectUnit_ianaType 0
+#define Z_IconObjectUnit_z3950type 1
+#define Z_IconObjectUnit_otherType 2
+    char *bodyType;
+    Odr_oct *content;
+} Z_IconObjectUnit;
+
+typedef struct Z_IconObject
+{
+    int num;
+    Z_IconObjectUnit **elements;
+} Z_IconObject;
+
+typedef struct Z_ContactInfo
+{
+    char *name;                             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_HumanString *address;                 /* OPTIONAL */
+    char *email;                            /* OPTIONAL */
+    char *phone;                            /* OPTIONAL */
+} Z_ContactInfo;
+
+typedef struct Z_NetworkAddressIA
+{
+    char *hostAddress;
+    int *port;
+} Z_NetworkAddressIA;
+
+typedef struct Z_NetworkAddressOPA
+{
+    char *pSel;
+    char *sSel;                  /* OPTIONAL */
+    char *tSel;                  /* OPTIONAL */
+    char *nSap;
+} Z_NetworkAddressOPA;
+
+typedef struct Z_NetworkAddressOther
+{
+    char *type;
+    char *address;
+} Z_NetworkAddressOther;
+
+typedef struct Z_NetworkAddress
+{
+    int which;
+#define Z_NetworkAddress_iA 0
+#define Z_NetworkAddress_oPA 1
+#define Z_NetworkAddress_other 2
+    union
+    {
+       Z_NetworkAddressIA *internetAddress;
+       Z_NetworkAddressOPA *osiPresentationAddress;
+       Z_NetworkAddressOther *other;
+    } u;
+} Z_NetworkAddress;
+
+typedef struct Z_PrivateCapOperator
+{
+    char *roperator;
+    Z_HumanString *description;             /* OPTIONAL */
+} Z_PrivateCapOperator;
+    
+typedef struct Z_SearchKey
+{
+    char *searchKey;
+    Z_HumanString *description;             /* OPTIONAL */
+} Z_SearchKey;
+
+typedef struct Z_PrivateCapabilities
+{
+    int num_operators;
+    Z_PrivateCapOperator **operators;      /* OPTIONAL */
+    int num_searchKeys;
+    Z_SearchKey **searchKeys;               /* OPTIONAL */
+    int num_description;
+    Z_HumanString **description;            /* OPTIONAL */
+} Z_PrivateCapabilities;
+
+typedef struct Z_ProxSupportPrivate
+{
+    int *unit;
+    Z_HumanString *description;             /* OPTIONAL */
+} Z_ProxSupportPrivate;
+
+typedef struct Z_ProxSupportUnit
+{
+    int which;
+#define Z_ProxSupportUnit_known 0
+#define Z_ProxSupportUnit_private 1
+    union
+    {
+       int *known;
+       Z_ProxSupportPrivate *zprivate;
+    } u;
+} Z_ProxSupportUnit;
+
+typedef struct Z_ProximitySupport
+{
+    bool_t *anySupport;
+    int num_unitsSupported;
+    Z_ProxSupportUnit **unitsSupported;     /* OPTIONAL */
+} Z_ProximitySupport;
+
+typedef struct Z_RpnCapabilities
+{
+    int num_operators;
+    int **operators;                        /* OPTIONAL */
+    bool_t *resultSetAsOperandSupported;
+    bool_t *restrictionOperandSupported;
+    Z_ProximitySupport *proximity;          /* OPTIONAL */
+} Z_RpnCapabilities;
+
+typedef struct Z_Iso8777Capabilities
+{
+    int num_searchKeys;
+    Z_SearchKey **searchKeys;
+    Z_HumanString *restrictions;            /* OPTIONAL */
+} Z_Iso8777Capabilities;
+
+typedef struct Z_QueryTypeDetails
+{
+    int which;
+#define Z_QueryTypeDetails_private 0
+#define Z_QueryTypeDetails_rpn 1
+#define Z_QueryTypeDetails_iso8777 2
+#define Z_QueryTypeDetails_z39_58 3
+#define Z_QueryTypeDetails_erpn 4
+#define Z_QueryTypeDetails_rankedList 5
+    union
+    {
+       Z_PrivateCapabilities *zprivate;
+       Z_RpnCapabilities *rpn;
+       Z_Iso8777Capabilities *iso8777;
+       Z_HumanString *z3958;
+       Z_RpnCapabilities *erpn;
+       Z_HumanString *rankedList;
+    } u;
+} Z_QueryTypeDetails;
+
+typedef struct Z_AccessRestrictionsUnit
+{
+    int *accessType;
+#define Z_AccessRestrictionsUnit_any                 0
+#define Z_AccessRestrictionsUnit_search              1
+#define Z_AccessRestrictionsUnit_present             2
+#define Z_AccessRestrictionsUnit_specific_elements   3
+#define Z_AccessRestrictionsUnit_extended_services   4
+#define Z_AccessRestrictionsUnit_by_database         5
+    Z_HumanString *accessText;              /* OPTIONAL */
+    int num_accessChallenges;
+    Odr_oid **accessChallenges;             /* OPTIONAL */
+} Z_AccessRestrictionsUnit;
+
+typedef struct Z_AccessRestrictions
+{
+    int num;
+    Z_AccessRestrictionsUnit **elements;
+} Z_AccessRestrictions;
+
+typedef struct Z_Charge
+{
+    Z_IntUnit *cost;
+    Z_Unit *perWhat;                        /* OPTIONAL */
+    Z_HumanString *text;                    /* OPTIONAL */
+} Z_Charge;
+
+typedef struct Z_CostsOtherCharge
+{
+    Z_HumanString *forWhat;
+    Z_Charge *charge;
+} Z_CostsOtherCharge;
+
+typedef struct Z_Costs
+{
+    Z_Charge *connectCharge;                /* OPTIONAL */
+    Z_Charge *connectTime;                  /* OPTIONAL */
+    Z_Charge *displayCharge;                /* OPTIONAL */
+    Z_Charge *searchCharge;                 /* OPTIONAL */
+    Z_Charge *subscriptCharge;              /* OPTIONAL */
+    int num_otherCharges;
+    Z_CostsOtherCharge **otherCharges;      /* OPTIONAL */
+} Z_Costs;
+
+typedef struct Z_AccessInfo
+{
+    int num_queryTypesSupported;
+    Z_QueryTypeDetails **queryTypesSupported;  /* OPTIONAL */
+    int num_diagnosticsSets;
+    Odr_oid **diagnosticsSets;              /* OPTIONAL */
+    int num_attributeSetIds;
+    Odr_oid **attributeSetIds;     /* OPTIONAL */
+    int num_schemas;
+    Odr_oid **schemas;                      /* OPTIONAL */
+    int num_recordSyntaxes;
+    Odr_oid **recordSyntaxes;               /* OPTIONAL */
+    int num_resourceChallenges;
+    Odr_oid **resourceChallenges;           /* OPTIONAL */
+    Z_AccessRestrictions *restrictedAccess;  /* OPTIONAL */
+    Z_Costs *costInfo;                      /* OPTIONAL */
+    int num_variantSets;
+    Odr_oid **variantSets;                  /* OPTIONAL */
+    int num_elementSetNames;
+    char **elementSetNames;     /* OPTIONAL */
+    int num_unitSystems;
+    char **unitSystems;                     /* OPTIONAL */
+} Z_AccessInfo;
+
+typedef struct Z_DatabaseList
+{
+    int num_databases;
+    Z_DatabaseName **databases;
+} Z_DatabaseList;
+
+typedef struct Z_AttributeValueList
+{
+    int num_attributes;
+    Z_StringOrNumeric **attributes;
+} Z_AttributeValueList;
+
+typedef struct Z_AttributeOccurrence
+{
+    Odr_oid *attributeSet;         /* OPTIONAL */
+    int *attributeType;
+    Odr_null *mustBeSupplied;               /* OPTIONAL */
+    int which;
+#define Z_AttributeOcc_any_or_none 0
+#define Z_AttributeOcc_specific 1
+    union
+    {
+       Odr_null *any_or_none;
+       Z_AttributeValueList *specific;
+    } attributeValues;
+} Z_AttributeOccurrence;
+
+typedef struct Z_AttributeCombination
+{
+    int num_occurrences;
+    Z_AttributeOccurrence **occurrences;
+} Z_AttributeCombination;
+
+typedef struct Z_AttributeCombinations
+{
+    Odr_oid *defaultAttributeSet;
+    int num_legalCombinations;
+    Z_AttributeCombination **legalCombinations;
+} Z_AttributeCombinations;
+
+typedef struct Z_AttributeValue
+{
+    Z_StringOrNumeric *value;
+    Z_HumanString *description;             /* OPTIONAL */
+    int num_subAttributes;
+    Z_StringOrNumeric **subAttributes;      /* OPTIONAL */
+    int num_superAttributes;
+    Z_StringOrNumeric **superAttributes;    /* OPTIONAL */
+    Odr_null *partialSupport;               /* OPTIONAL */
+} Z_AttributeValue;
+
+typedef struct Z_TargetInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * key elements
+     */
+    char *name;
+    /*
+     * non-key brief elements
+     */
+    Z_HumanString *recentNews;             /* OPTIONAL */
+    Z_IconObject *icon;                     /* OPTIONAL */
+    bool_t *namedResultSets;
+    bool_t *multipleDBsearch;
+    int *maxResultSets;                     /* OPTIONAL */
+    int *maxResultSize;                     /* OPTIONAL */
+    int *maxTerms;                          /* OPTIONAL */
+    Z_IntUnit *timeoutInterval;             /* OPTIONAL */
+    Z_HumanString *welcomeMessage;          /* OPTIONAL */
+    /*
+     * non-brief elements
+     */
+    Z_ContactInfo *contactInfo;             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    int num_nicknames;
+    char **nicknames;
+    Z_HumanString *usageRest;              /* OPTIONAL */
+    Z_HumanString *paymentAddr;             /* OPTIONAL */
+    Z_HumanString *hours;                   /* OPTIONAL */
+    int num_dbCombinations;
+    Z_DatabaseList **dbCombinations;        /* OPTIONAL */
+    int num_addresses;
+    Z_NetworkAddress **addresses;           /* OPTIONAL */
+    int num_languages;
+    char **languages;                       /* OPTIONAL */
+
+    Z_AccessInfo *commonAccessInfo;         /* OPTIONAL */
+} Z_TargetInfo;
+
+typedef struct Z_DatabaseInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Z_DatabaseName *name;
+    /* 
+     * Non-key elements.
+     */
+    Odr_null *explainDatabase;              /* OPTIONAL */
+    int num_nicknames;
+    Z_DatabaseName **nicknames;             /* OPTIONAL */
+    Z_IconObject *icon;                     /* OPTIONAL */
+    bool_t *userFee;
+    bool_t *available;
+    Z_HumanString *titleString;             /* OPTIONAL */
+    /*
+     * Non-brief elements.
+     */
+    int num_keywords;
+    Z_HumanString **keywords;               /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_DatabaseList *associatedDbs;          /* OPTIONAL */
+    Z_DatabaseList *subDbs;                 /* OPTIONAL */
+    Z_HumanString *disclaimers;             /* OPTIONAL */
+    Z_HumanString *news;                    /* OPTIONAL */
+
+#if 1
+    int which;
+    union {
+       int *actualNumber;
+       int *approxNumber;
+#define Z_DatabaseInfo_actualNumber 1
+#define Z_DatabaseInfo_approxNumber 2
+    } u; /* OPT */
+
+#else
+    int recordCount_which;
+#define Z_DatabaseInfo_actualNumber 0
+#define Z_DatabaseInfo_approxNumber 1
+    int *recordCount;                       /* OPTIONAL */
+#endif
+    Z_HumanString *defaultOrder;            /* OPTIONAL */
+    int *avRecordSize;                      /* OPTIONAL */
+    int *maxRecordSize;                     /* OPTIONAL */
+    Z_HumanString *hours;                   /* OPTIONAL */
+    Z_HumanString *bestTime;                /* OPTIONAL */
+    char *lastUpdate;          /* OPTIONAL */
+    Z_IntUnit *updateInterval;              /* OPTIONAL */
+    Z_HumanString *coverage;                /* OPTIONAL */
+    bool_t *proprietary;                    /* OPTIONAL */
+    Z_HumanString *copyrightText;           /* OPTIONAL */
+    Z_HumanString *copyrightNotice;         /* OPTIONAL */
+    Z_ContactInfo *producerContactInfo;     /* OPTIONAL */
+    Z_ContactInfo *supplierContactInfo;     /* OPTIONAL */
+    Z_ContactInfo *submissionContactInfo;   /* OPTIONAL */
+    Z_AccessInfo *accessInfo;               /* OPTIONAL */
+} Z_DatabaseInfo;
+
+typedef struct Z_TagTypeMapping
+{
+    int *tagType;
+    Odr_oid *tagSet;                        /* OPTIONAL */
+    Odr_null *defaultTagType;               /* OPTIONAL */
+} Z_TagTypeMapping;
+
+typedef struct Z_PathUnit
+{
+    int *tagType;
+    Z_StringOrNumeric *tagValue;
+} Z_PathUnit;
+
+typedef struct Z_Path
+{
+    int num;
+    Z_PathUnit **list;
+} Z_Path;
+
+struct Z_ElementDataType;
+typedef struct Z_ElementDataType Z_ElementDataType;
+
+typedef struct Z_ElementInfo
+{
+    char *elementName;
+    Z_Path *elementTagPath;
+    Z_ElementDataType *dataType;            /* OPTIONAL */
+    bool_t *required;
+    bool_t *repeatable;
+    Z_HumanString *description;             /* OPTIONAL */
+} Z_ElementInfo;
+
+typedef struct Z_ElementInfoList
+{
+    int num;
+    Z_ElementInfo **list;
+} Z_ElementInfoList;
+
+struct Z_ElementDataType
+{
+    int which;
+#define Z_ElementDataType_primitive 0
+#define Z_ElementDataType_structured 1
+    union
+    {
+       int *primitive;
+#define Z_PrimitiveDataType_octetString         0
+#define Z_PrimitiveDataType_numeric             1
+#define Z_PrimitiveDataType_date                2
+#define Z_PrimitiveDataType_external            3
+#define Z_PrimitiveDataType_string              4
+#define Z_PrimitiveDataType_trueOrFalse         5
+#define Z_PrimitiveDataType_oid                 6
+#define Z_PrimitiveDataType_intUnit             7
+#define Z_PrimitiveDataType_empty               8
+#define Z_PrimitiveDataType_noneOfTheAbove      100
+       Z_ElementInfoList *structured;
+    } u;
+};
+
+typedef struct Z_TagSetInfoElements
+{
+    char *elementname;
+    int num_nicknames;
+    char **nicknames;                       /* OPTIONAL */
+    Z_StringOrNumeric *elementTag;
+    Z_HumanString *description;             /* OPTIONAL */
+    int *dataType;                          /* OPTIONAL */
+    /* (value as in Z_PrimitiveElement) */
+    Z_OtherInformation *otherTagInfo;       /* OPTIONAL */
+} Z_TagSetInfoElements;
+
+typedef struct Z_SchemaInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Odr_oid *schema;
+    /*
+     * Non-key elements
+     */
+    char *name;
+    /*
+     * Non-brief elements
+     */
+    Z_HumanString *description;             /* OPTIONAL */
+    int num_tagTypeMapping;
+    Z_TagTypeMapping **tagTypeMapping;      /* OPTIONAL */
+    int num_recordStructure;
+    Z_ElementInfo **recordStructure;        /* OPTIONAL */
+} Z_SchemaInfo;
+
+
+typedef struct Z_TagSetInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Odr_oid *tagSet;
+    /*
+     * Non-key elements
+     */
+    char *name;
+    /*
+     * Non-brief elements
+     */
+    Z_HumanString *description;             /* OPTIONAL */
+    int num_elements;
+    Z_TagSetInfoElements **elements;        /* OPTIONAL */
+} Z_TagSetInfo;
+
+typedef struct Z_RecordSyntaxInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Odr_oid *recordSyntax;
+    /*
+     * Non-key elements
+     */
+    char *name;
+    /*
+     * Non-brief elements
+     */
+    int num_transferSyntaxes;
+    Odr_oid **transferSyntaxes;             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    char *asn1Module;                       /* OPTIONAL */
+    int num_abstractStructure;
+    Z_ElementInfo **abstractStructure;      /* OPTIONAL */
+} Z_RecordSyntaxInfo;
+
+typedef struct Z_AttributeDescription
+{
+    char *name;                             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_StringOrNumeric *attributeValue;
+    int num_equivalentAttributes;
+    Z_StringOrNumeric **equivalentAttributes; /* OPTIONAL */
+} Z_AttributeDescription;
+
+typedef struct Z_AttributeType
+{
+    char *name;                             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    int *attributeType;
+    int num_attributeValues;
+    Z_AttributeDescription **attributeValues;
+} Z_AttributeType;
+
+typedef struct Z_AttributeSetInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Odr_oid *attributeSet;
+    /*
+     * Non-key elements
+     */
+    char *name;
+    /*
+     * Non-brief elements
+     */
+    int num_attributes;
+    Z_AttributeType **attributes;           /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+} Z_AttributeSetInfo;
+
+typedef struct Z_TermListElement
+{
+    char *name;
+    Z_HumanString *title;                   /* OPTIONAL */
+    int *searchCost;                        /* OPTIONAL */
+#define Z_TermListElement_optimized           0
+#define Z_TermListElement_normal              1
+#define Z_TermListElement_expensive           2
+#define Z_TermListElement_filter              3
+    bool_t *scanable;
+    int num_broader;
+    char **broader;                         /* OPTIONAL */
+    int num_narrower;
+    char **narrower;                        /* OPTIONAL */
+} Z_TermListElement;
+
+typedef struct Z_TermListInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Z_DatabaseName *databaseName;
+    /*
+     * Non-key elements
+     */
+    int num_termLists;
+    Z_TermListElement **termLists;
+} Z_TermListInfo;
+
+typedef struct Z_ExtendedServicesInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Odr_oid *type;
+    /*
+     * Non-key elements
+     */
+    char *name;                             /* OPTIONAL */
+    bool_t *privateType;
+    bool_t *restrictionsApply;
+    bool_t *feeApply;
+    bool_t *available;
+    bool_t *retentionSupported;
+    int *waitAction;
+#define Z_ExtendedServicesInfo_waitSupported       1
+#define Z_ExtendedServicesInfo_waitAlways          2
+#define Z_ExtendedServicesInfo_waitNotSupported    3
+#define Z_ExtendedServicesInfo_depends             4
+#define Z_ExtendedServicesInfo_notSaying           5
+    /*
+     * Non-brief elements
+     */
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_External *specificExplain;          /* OPTIONAL */
+    char *esASN;                            /* OPTIONAL */
+} Z_ExtendedServicesInfo;
+
+typedef struct Z_OmittedAttributeInterpretation
+{
+    Z_StringOrNumeric *defaultValue;        /* OPTIONAL */
+    Z_HumanString *defaultDescription;      /* OPTIONAL */
+} Z_OmittedAttributeInterpretation;
+
+typedef struct Z_AttributeTypeDetails
+{
+    int *attributeType;
+    Z_OmittedAttributeInterpretation *defaultIfOmitted;  /* OPTIONAL */
+    int num_attributeValues;
+    Z_AttributeValue **attributeValues;     /* OPTIONAL */
+} Z_AttributeTypeDetails;
+
+typedef struct Z_AttributeSetDetails
+{
+    Odr_oid *attributeSet;
+    int num_attributesByType;
+    Z_AttributeTypeDetails **attributesByType;
+} Z_AttributeSetDetails;
+
+typedef struct Z_AttributeDetails
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key details
+     */
+    Z_DatabaseName *databaseName;
+    /*
+     * Non-brief elements
+     */
+    int num_attributesBySet;
+    Z_AttributeSetDetails **attributesBySet;  /* OPTIONAL */
+    Z_AttributeCombinations *attributeCombinations;  /* OPTIONAL */
+} Z_AttributeDetails;
+
+typedef struct Z_EScanInfo
+{
+    int *maxStepSize;                       /* OPTIONAL */
+    Z_HumanString *collatingSequence;       /* OPTIONAL */
+    bool_t *increasing;                     /* OPTIONAL */
+} Z_EScanInfo;
+
+typedef struct Z_TermListDetails
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    char *termListName;
+    /*
+     * Non-brief elements
+     */
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_AttributeCombinations *attributes;    /* OPTIONAL */
+    Z_EScanInfo *scanInfo;                  /* OPTIONAL */
+    int *estNumberTerms;                    /* OPTIONAL */
+    int num_sampleTerms;
+    Z_Term **sampleTerms;                   /* OPTIONAL */
+} Z_TermListDetails;
+
+typedef struct Z_RecordTag
+{
+    Z_StringOrNumeric *qualifier;           /* OPTIONAL */
+    Z_StringOrNumeric *tagValue;
+} Z_RecordTag;
+
+typedef struct Z_PerElementDetails
+{
+    char *name;                             /* OPTIONAL */
+    Z_RecordTag *recordTag;                 /* OPTIONAL */
+    int num_schemaTags;
+    Z_Path **schemaTags;                    /* OPTIONAL */
+    int *maxSize;                           /* OPTIONAL */
+    int *minSize;                           /* OPTIONAL */
+    int *avgSize;                           /* OPTIONAL */
+    int *fixedSize;                         /* OPTIONAL */
+    bool_t *repeatable;
+    bool_t *required;
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_HumanString *contents;                /* OPTIONAL */
+    Z_HumanString *billingInfo;             /* OPTIONAL */
+    Z_HumanString *restrictions;            /* OPTIONAL */
+    int num_alternateNames;
+    char **alternateNames;                  /* OPTIONAL */
+    int num_genericNames;
+    char **genericNames;                    /* OPTIONAL */
+    Z_AttributeCombinations *searchAccess;  /* OPTIONAL */
+} Z_PerElementDetails;
+
+typedef struct Z_ElementSetDetails
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Z_DatabaseName *databaseName;
+    char *elementSetName;
+    Odr_oid *recordSyntax;
+    /*
+     * Brief elements
+     */
+    Odr_oid *schema;
+    /*
+     * Non-brief elements
+     */
+    Z_HumanString *description;             /* OPTIONAL */
+    int num_detailsPerElement;
+    Z_PerElementDetails **detailsPerElement;  /* OPTIONAL */
+} Z_ElementSetDetails;
+
+typedef struct Z_RetrievalRecordDetails
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Z_DatabaseName *databaseName;
+    Odr_oid *schema;
+    Odr_oid *recordSyntax;
+    /*
+     * Non-brief elements
+     */
+    Z_HumanString *description;             /* OPTIONAL */
+    int num_detailsPerElement;
+    Z_PerElementDetails **detailsPerElement;  /* OPTIONAL */
+} Z_RetrievalRecordDetails;
+
+typedef struct Z_SortKeyDetails
+{
+    Z_HumanString *description;                        /* OPTIONAL */
+    int num_elementSpecifications;
+    Z_Specification **elementSpecifications;           /* OPTIONAL */
+    Z_AttributeCombinations *attributeSpecifications;  /* OPTIONAL */
+    int which;
+#define Z_SortKeyDetails_character 0
+#define Z_SortKeyDetails_numeric 1
+#define Z_SortKeyDetails_structured 2
+    union
+    {
+       Odr_null *character;
+       Odr_null *numeric;
+       Z_HumanString *structured;
+    } u;
+    int *caseSensitivity;                              /* OPTIONAL */
+#define Z_SortKeyDetails_always              0
+#define Z_SortKeyDetails_never               1
+#define Z_SortKeyDetails_default_yes         2
+#define Z_SortKeyDetails_default_no          3
+} Z_SortKeyDetails;
+
+typedef struct Z_SortDetails
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Z_DatabaseName *databaseName;
+    /* 
+     * Non-brief elements
+     */
+    int num_sortKeys;
+    Z_SortKeyDetails **sortKeys;            /* OPTIONAL */
+} Z_SortDetails;
+
+typedef struct Z_ProcessingInformation
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Z_DatabaseName *databaseName;
+    int *processingContext;
+#define Z_ProcessingInformation_access               0
+#define Z_ProcessingInformation_search               1
+#define Z_ProcessingInformation_retrieval            2
+#define Z_ProcessingInformation_record_presentation  3
+#define Z_ProcessingInformation_record_handling      4
+    char *name;
+    Odr_oid *oid;
+    /*
+     * Non-brief elements
+     */
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_External *instructions;             /* OPTIONAL */
+} Z_ProcessingInformation;
+
+typedef struct Z_ValueDescription
+{
+    int which;
+#define Z_ValueDescription_integer 0
+#define Z_ValueDescription_string 1
+#define Z_ValueDescription_octets 2
+#define Z_ValueDescription_oid 3
+#define Z_ValueDescription_unit 4
+#define Z_ValueDescription_valueAndUnit 5
+    union
+    {
+       int *integer;
+       char *string;
+       Odr_oct *octets;
+       Odr_oid *oid;
+       Z_Unit *unit;
+       Z_IntUnit *valueAndUnit;
+    } u;
+} Z_ValueDescription;
+
+typedef struct Z_ValueRange
+{
+    Z_ValueDescription *lower;              /* OPTIONAL */
+    Z_ValueDescription *upper;              /* OPTIONAL */
+} Z_ValueRange;
+
+typedef struct Z_ValueSetEnumerated
+{
+    int num;
+    Z_ValueDescription **elements;
+} Z_ValueSetEnumerated;
+
+typedef struct Z_ValueSet
+{
+    int which;
+#define Z_ValueSet_range 0
+#define Z_ValueSet_enumerated 1
+    union
+    {
+       Z_ValueRange *range;
+       Z_ValueSetEnumerated *enumerated;
+    } u;
+} Z_ValueSet;
+
+typedef struct Z_VariantValue
+{
+    int *dataType;
+    Z_ValueSet *values;                     /* OPTIONAL */
+} Z_VariantValue;
+
+typedef struct Z_VariantType
+{
+    char *name;                             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    int *variantType;
+    Z_VariantValue *variantValue;           /* OPTIONAL */
+} Z_VariantType;
+
+typedef struct Z_VariantClass
+{
+    char *name;                             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    int *variantClass;
+    int num_variantTypes;
+    Z_VariantType **variantTypes;
+} Z_VariantClass;
+
+typedef struct Z_VariantSetInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    Odr_oid *variantSet;
+    /*
+     * Brief elements
+     */
+    char *name;
+    /*
+     * Non-brief elements
+     */
+    int num_variants;
+    Z_VariantClass **variants;              /* OPTIONAL */
+} Z_VariantSetInfo;
+
+typedef struct Z_Units
+{
+    char *name;                             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_StringOrNumeric *unit;
+} Z_Units;
+
+typedef struct Z_UnitType
+{
+    char *name;                             /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    Z_StringOrNumeric *unitType;
+    int num_units;
+    Z_Units **units;
+} Z_UnitType;
+
+typedef struct Z_UnitInfo
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    /*
+     * Key elements
+     */
+    char *unitSystem;
+    /*
+     * Non-brief elements
+     */
+    Z_HumanString *description;             /* OPTIONAL */
+    int num_units;
+    Z_UnitType **units;                     /* OPTIONAL */
+} Z_UnitInfo;
+
+typedef struct Z_CategoryInfo
+{
+    char *category;
+    char *originalCategory;                 /* OPTIONAL */
+    Z_HumanString *description;             /* OPTIONAL */
+    char *asn1Module;                       /* OPTIONAL */
+} Z_CategoryInfo;
+
+typedef struct Z_CategoryList
+{
+    Z_CommonInfo *commonInfo;               /* OPTIONAL */
+    int num_categories;
+    Z_CategoryInfo **categories;
+} Z_CategoryList;
+
+typedef struct Z_ExplainRecord
+{
+    int which;
+#define Z_Explain_targetInfo 0
+#define Z_Explain_databaseInfo 1
+#define Z_Explain_schemaInfo 2
+#define Z_Explain_tagSetInfo 3
+#define Z_Explain_recordSyntaxInfo 4
+#define Z_Explain_attributeSetInfo 5
+#define Z_Explain_termListInfo 6
+#define Z_Explain_extendedServicesInfo 7
+#define Z_Explain_attributeDetails 8
+#define Z_Explain_termListDetails 9
+#define Z_Explain_elementSetDetails 10
+#define Z_Explain_retrievalRecordDetails 11
+#define Z_Explain_sortDetails 12
+#define Z_Explain_processing 13
+#define Z_Explain_variants 14
+#define Z_Explain_units 15
+#define Z_Explain_categoryList 16
+    union
+    {
+       Z_TargetInfo *targetInfo;
+       Z_DatabaseInfo *databaseInfo;
+       Z_SchemaInfo *schemaInfo;
+       Z_TagSetInfo *tagSetInfo;
+       Z_RecordSyntaxInfo *recordSyntaxInfo;
+       Z_AttributeSetInfo *attributeSetInfo;
+       Z_TermListInfo *termListInfo;
+       Z_ExtendedServicesInfo *extendedServicesInfo;
+       Z_AttributeDetails *attributeDetails;
+       Z_TermListDetails *termListDetails;
+       Z_ElementSetDetails *elementSetDetails;
+       Z_RetrievalRecordDetails *retrievalRecordDetails;
+       Z_SortDetails *sortDetails;
+       Z_ProcessingInformation *processing;
+       Z_VariantSetInfo *variants;
+       Z_UnitInfo *units;
+       Z_CategoryList *categoryList;
+    } u;
+} Z_ExplainRecord;
+
+YAZ_EXPORT int z_ExplainRecord(ODR o, Z_ExplainRecord **p, int opt,
+                              const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-ext.h b/include/yaz/prt-ext.h
new file mode 100644 (file)
index 0000000..5d7f6be
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * Biased-choice External for Z39.50.
+ */
+
+#ifndef PRT_EXT_H
+#define PRT_EXT_H
+
+#include <yaz/yconfig.h>
+#include <yaz/oid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Used to keep track of known External definitions (a loose approach
+ * to DEFINED_BY).
+ */
+
+typedef struct Z_ext_typeent
+{
+    oid_value dref;    /* the direct-reference OID value. */
+    int what;          /* discriminator value for the external CHOICE */
+    Odr_fun fun;       /* decoder function */
+} Z_ext_typeent;
+
+struct Z_External
+{
+    Odr_oid *direct_reference;
+    int *indirect_reference;
+    char *descriptor;
+    int which;
+/* Generic types */
+#define Z_External_single 0
+#define Z_External_octet 1
+#define Z_External_arbitrary 2
+/* Specific types */
+#define Z_External_sutrs 3
+#define Z_External_explainRecord 4
+#define Z_External_resourceReport1 5
+#define Z_External_resourceReport2 6
+#define Z_External_promptObject1 7
+#define Z_External_grs1 8
+#define Z_External_extendedService 9
+#define Z_External_itemOrder 10
+#define Z_External_diag1 11
+#define Z_External_espec1 12
+#define Z_External_summary 13
+#define Z_External_OPAC 14
+#define Z_External_searchResult1 15
+#define Z_External_update 16
+#define Z_External_dateTime 17
+#define Z_External_universeReport 18
+    union
+    {
+       /* Generic types */
+       Odr_any *single_ASN1_type;
+       Odr_oct *octet_aligned;
+       Odr_bitmask *arbitrary;
+
+       /* Specific types */
+       Z_SUTRS *sutrs;
+       Z_ExplainRecord *explainRecord;
+       Z_ResourceReport1 *resourceReport1;
+       Z_ResourceReport2 *resourceReport2;
+       Z_PromptObject1 *promptObject1;
+       Z_GenericRecord *grs1;
+       Z_TaskPackage *extendedService;
+       Z_ItemOrder *itemOrder;
+       Z_DiagnosticFormat *diag1;
+       Z_Espec1 *espec1;
+       Z_BriefBib *summary;
+       Z_SearchInfoReport *searchResult1;
+       Z_IUUpdate *update;
+       Z_DateTime *dateTime;
+    Z_UniverseReport *universeReport;
+    } u;
+};
+
+YAZ_EXPORT int z_External(ODR o, Z_External **p, int opt, const char *name);
+YAZ_EXPORT Z_ext_typeent *z_ext_getentbyref(oid_value val);
+YAZ_EXPORT Z_External *z_ext_record(ODR o, int format, const char *buf,
+                                   int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-grs.h b/include/yaz/prt-grs.h
new file mode 100644 (file)
index 0000000..c7f5f07
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 1995-1998, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef PRT_GRS_H
+#define PRT_GRS_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Z_GenericRecord;
+typedef struct Z_GenericRecord Z_GenericRecord;
+
+typedef struct Z_ElementData
+{
+    int which;
+#define Z_ElementData_octets 0
+#define Z_ElementData_numeric 1
+#define Z_ElementData_date 2
+#define Z_ElementData_ext 3
+#define Z_ElementData_string 4
+#define Z_ElementData_trueOrFalse 5
+#define Z_ElementData_oid 6
+#define Z_ElementData_intUnit 7
+#define Z_ElementData_elementNotThere 8
+#define Z_ElementData_elementEmpty 9
+#define Z_ElementData_noDataRequested 10
+#define Z_ElementData_diagnostic 11
+#define Z_ElementData_subtree 12
+    union
+    {
+       Odr_oct *octets;                      
+       int *numeric;                         
+       char *date;             
+       Z_External *ext;                     
+       char *string;                         
+       bool_t *trueOrFalse;                  
+       Odr_oid *oid;                         
+       Z_IntUnit *intUnit;                  
+       Odr_null *elementNotThere;            
+       Odr_null *elementEmpty;               
+       Odr_null *noDataRequested;            
+       Z_External *diagnostic;              
+       Z_GenericRecord *subtree;            
+    } u;
+} Z_ElementData;
+
+typedef struct Z_Order
+{
+    bool_t *ascending;                    
+    int *order;                           
+} Z_Order;
+
+typedef struct Z_Usage
+{
+    int *type;                            
+#define Z_Usage_redistributable     1
+#define Z_Usage_restricted          2
+#define Z_Usage_licensePointer      3
+    char *restriction;                      /* OPTIONAL */
+} Z_Usage;
+
+typedef struct Z_HitVector
+{
+    Z_Term *satisfier;                      /* OPTIONAL */
+    Z_IntUnit *offsetIntoElement;           /* OPTIONAL */
+    Z_IntUnit *length;                      /* OPTIONAL */
+    int *hitRank;                           /* OPTIONAL */
+    Odr_oct *targetToken;                   /* OPTIONAL */
+} Z_HitVector;
+
+typedef struct Z_Triple
+{
+    Odr_oid *variantSetId;                  /* OPTIONAL */
+    int *zclass;
+    int *type;
+    int which;
+#define Z_Triple_integer 0
+#define Z_Triple_internationalString 1
+#define Z_Triple_octetString 2
+#define Z_Triple_oid 3
+#define Z_Triple_boolean 4
+#define Z_Triple_null 5
+#define Z_Triple_unit 6
+#define Z_Triple_valueAndUnit 7
+    union
+    {
+       int *integer;
+       char *internationalString;
+       Odr_oct *octetString;
+       Odr_oid *oid;
+       bool_t *zboolean;
+       Odr_null *null;
+       Z_Unit *unit;
+       Z_IntUnit *valueAndUnit;
+    } value;
+} Z_Triple;
+
+typedef struct Z_Variant
+{
+    Odr_oid *globalVariantSetId;            /* OPTIONAL */
+    int num_triples;
+    Z_Triple **triples;
+} Z_Variant;
+
+typedef struct Z_TagUnit
+{
+    int *tagType;                           /* OPTIONAL */
+    Z_StringOrNumeric *tagValue;         
+    int *tagOccurrence;                     /* OPTIONAL */
+} Z_TagUnit;
+
+typedef struct Z_TagPath
+{
+    int num_tags;
+    Z_TagUnit **tags;
+} Z_TagPath;
+
+typedef struct Z_ElementMetaData
+{
+    Z_Order *seriesOrder;                   /* OPTIONAL */
+    Z_Usage *usageRight;                    /* OPTIONAL */
+    int num_hits;
+    Z_HitVector **hits;                     /* OPTIONAL */
+    char *displayName;                      /* OPTIONAL */
+    int num_supportedVariants;
+    Z_Variant **supportedVariants;          /* OPTIONAL */
+    char *message;                          /* OPTIONAL */
+    Odr_oct *elementDescriptor;             /* OPTIONAL */
+    Z_TagPath *surrogateFor;                /* OPTIONAL */
+    Z_TagPath *surrogateElement;            /* OPTIONAL */
+    Z_External *other;                      /* OPTIONAL */
+} Z_ElementMetaData;
+
+typedef struct Z_TaggedElement
+{
+    int *tagType;                           /* OPTIONAL */
+    Z_StringOrNumeric *tagValue;         
+    int *tagOccurrence;                     /* OPTIONAL */
+    Z_ElementData *content;              
+    Z_ElementMetaData *metaData;            /* OPTIONAL */
+    Z_Variant *appliedVariant;              /* OPTIONAL */
+} Z_TaggedElement;
+
+struct Z_GenericRecord
+{
+    int num_elements;
+    Z_TaggedElement **elements;
+};
+
+YAZ_EXPORT int z_GenericRecord(ODR o, Z_GenericRecord **p, int opt,
+                              const char *name);
+YAZ_EXPORT int z_Variant(ODR o, Z_Variant **p, int opt,
+                        const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-proto.h b/include/yaz/prt-proto.h
new file mode 100644 (file)
index 0000000..e6a4f3e
--- /dev/null
@@ -0,0 +1,1168 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Id: prt-proto.h,v 1.1 1999-11-30 13:47:11 adam Exp $
+ */
+
+#ifndef PRT_PROTO_H
+#define PRT_PROTO_H
+
+#include <yaz/yconfig.h>
+#include <yaz/odr.h>
+#include <yaz/oid.h>
+#include <yaz/yaz-version.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
+
+struct Z_External;
+typedef struct Z_External Z_External;
+
+typedef Odr_oct Z_ReferenceId;
+typedef char Z_DatabaseName;
+typedef char Z_ResultSetId;
+typedef Odr_oct Z_ResultsetId;
+
+typedef struct Z_InfoCategory
+{
+    Odr_oid *categoryTypeId;         /* OPTIONAL */
+    int *categoryValue;
+} Z_InfoCategory;
+
+typedef struct Z_OtherInformationUnit
+{
+    Z_InfoCategory *category;        /* OPTIONAL */
+    int which;
+#define Z_OtherInfo_characterInfo 0
+#define Z_OtherInfo_binaryInfo 1
+#define Z_OtherInfo_externallyDefinedInfo 2
+#define Z_OtherInfo_oid 3
+    union
+    {
+       char *characterInfo; 
+       Odr_oct *binaryInfo;
+       Z_External *externallyDefinedInfo;
+       Odr_oid *oid;
+    } information;
+} Z_OtherInformationUnit;
+
+typedef struct Z_OtherInformation
+{
+    int num_elements;
+    Z_OtherInformationUnit **list;
+} Z_OtherInformation;
+
+typedef struct Z_StringOrNumeric
+{
+    int which;
+#define Z_StringOrNumeric_string 0
+#define Z_StringOrNumeric_numeric 1
+    union
+    {
+       char *string;
+       int *numeric;
+    } u;
+} Z_StringOrNumeric;
+
+typedef struct Z_Unit
+{
+    char *unitSystem;               /* OPTIONAL */
+    Z_StringOrNumeric *unitType;    /* OPTIONAL */
+    Z_StringOrNumeric *unit;        /* OPTIONAL */
+    int *scaleFactor;               /* OPTIONAL */
+} Z_Unit;
+
+typedef struct Z_IntUnit
+{
+    int *value;
+    Z_Unit *unitUsed;
+} Z_IntUnit;
+
+typedef Odr_oct Z_SUTRS;
+
+typedef struct Z_StringList
+{
+    int num_strings;
+    char **strings;
+} Z_StringList;
+
+/* ----------------- INIT SERVICE  ----------------*/
+
+typedef struct
+{
+    char *groupId;       /* OPTIONAL */
+    char *userId;         /* OPTIONAL */
+    char *password;      /* OPTIONAL */
+} Z_IdPass;
+
+typedef struct Z_IdAuthentication
+{
+    int which;
+#define Z_IdAuthentication_open 0
+#define Z_IdAuthentication_idPass 1
+#define Z_IdAuthentication_anonymous 2
+#define Z_IdAuthentication_other 3
+    union
+    {
+       char *open;
+       Z_IdPass *idPass;
+       Odr_null *anonymous;
+       Z_External *other;
+    } u;
+} Z_IdAuthentication;
+
+#define Z_ProtocolVersion_1               0
+#define Z_ProtocolVersion_2               1
+#define Z_ProtocolVersion_3               2
+
+#define Z_Options_search                  0
+#define Z_Options_present                 1
+#define Z_Options_delSet                  2
+#define Z_Options_resourceReport          3
+#define Z_Options_triggerResourceCtrl     4
+#define Z_Options_resourceCtrl            5
+#define Z_Options_accessCtrl              6
+#define Z_Options_scan                    7
+#define Z_Options_sort                    8
+#define Z_Options_reserved                9
+#define Z_Options_extendedServices       10
+#define Z_Options_level_1Segmentation    11
+#define Z_Options_level_2Segmentation    12
+#define Z_Options_concurrentOperations   13
+#define Z_Options_namedResultSets        14
+
+typedef struct Z_InitRequest
+{
+    Z_ReferenceId *referenceId;                   /* OPTIONAL */
+    Odr_bitmask *protocolVersion;
+    Odr_bitmask *options;
+    int *preferredMessageSize;
+    int *maximumRecordSize;
+    Z_IdAuthentication* idAuthentication;        /* OPTIONAL */
+    char *implementationId;                      /* OPTIONAL */
+    char *implementationName;                    /* OPTIONAL */
+    char *implementationVersion;                 /* OPTIONAL */
+    Z_External *userInformationField;            /* OPTIONAL */
+    Z_OtherInformation *otherInfo;               /* OPTIONAL */
+} Z_InitRequest;
+
+typedef struct Z_InitResponse
+{
+    Z_ReferenceId *referenceId;    /* OPTIONAL */
+    Odr_bitmask *protocolVersion;
+    Odr_bitmask *options;
+    int *preferredMessageSize;
+    int *maximumRecordSize;
+    bool_t *result;
+    char *implementationId;      /* OPTIONAL */
+    char *implementationName;    /* OPTIONAL */
+    char *implementationVersion; /* OPTIONAL */
+    Z_External *userInformationField; /* OPTIONAL */
+    Z_OtherInformation *otherInfo;    /* OPTIONAL */
+} Z_InitResponse;
+
+typedef struct Z_NSRAuthentication
+{
+    char *user;
+    char *password;
+    char *account;
+} Z_NSRAuthentication;
+
+int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt,
+                       const char *name);
+
+int z_StrAuthentication(ODR o, char **p, int opt, const char *name);
+
+/* ------------------ SEARCH SERVICE ----------------*/
+
+typedef struct Z_DatabaseSpecificUnit
+{
+    char *databaseName;
+    char *elementSetName;
+} Z_DatabaseSpecificUnit;
+
+typedef struct Z_DatabaseSpecific
+{
+    int num_elements;
+    Z_DatabaseSpecificUnit **elements;
+} Z_DatabaseSpecific;
+
+typedef struct Z_ElementSetNames
+{
+    int which;
+#define Z_ElementSetNames_generic 0
+#define Z_ElementSetNames_databaseSpecific 1
+    union
+    {
+        char *generic;
+        Z_DatabaseSpecific *databaseSpecific;
+    } u;
+} Z_ElementSetNames;
+
+/* ---------------------- RPN QUERY --------------------------- */
+
+typedef struct Z_ComplexAttribute
+{
+    int num_list;
+    Z_StringOrNumeric **list;
+    int num_semanticAction;
+    int **semanticAction;           /* OPTIONAL */
+} Z_ComplexAttribute;
+
+typedef struct Z_AttributeElement
+{
+    Odr_oid *attributeSet;           /* OPTIONAL - v3 only */
+    int *attributeType;
+    int which;
+#define Z_AttributeValue_numeric 0
+#define Z_AttributeValue_complex 1
+    union
+    {
+       int *numeric;
+       Z_ComplexAttribute *complex;
+    } value;
+} Z_AttributeElement;
+
+typedef struct Z_Term 
+{
+    int which;
+#define Z_Term_general 0
+#define Z_Term_numeric 1
+#define Z_Term_characterString 2
+#define Z_Term_oid 3
+#define Z_Term_dateTime 4
+#define Z_Term_external 5
+#define Z_Term_integerAndUnit 6
+#define Z_Term_null 7
+    union
+    {
+       Odr_oct *general; /* this is required for v2 */
+       int *numeric;
+       char *characterString;
+       Odr_oid *oid;
+       char *dateTime;
+       Z_External *external;
+       /* Z_IntUnit *integerAndUnit; */
+       Odr_null *null;
+    } u;
+} Z_Term;
+
+typedef struct Z_AttributesPlusTerm
+{
+    int num_attributes;
+    Z_AttributeElement **attributeList;
+    Z_Term *term;
+} Z_AttributesPlusTerm;
+
+typedef struct Z_ResultSetPlusAttributes
+{
+    char *resultSet;
+    int num_attributes;
+    Z_AttributeElement **attributeList;
+} Z_ResultSetPlusAttributes;
+
+typedef struct Z_ProximityOperator
+{
+    bool_t *exclusion;          /* OPTIONAL */
+    int *distance;
+    bool_t *ordered;
+    int *relationType;
+#define Z_Prox_lessThan           1
+#define Z_Prox_lessThanOrEqual    2
+#define Z_Prox_equal              3
+#define Z_Prox_greaterThanOrEqual 4
+#define Z_Prox_greaterThan        5
+#define Z_Prox_notEqual           6
+    int which;
+#define Z_ProxCode_known 0
+#define Z_ProxCode_private 1
+    int *proximityUnitCode;
+#define Z_ProxUnit_character       1
+#define Z_ProxUnit_word            2
+#define Z_ProxUnit_sentence        3
+#define Z_ProxUnit_paragraph       4
+#define Z_ProxUnit_section         5
+#define Z_ProxUnit_chapter         6
+#define Z_ProxUnit_document        7
+#define Z_ProxUnit_element         8
+#define Z_ProxUnit_subelement      9
+#define Z_ProxUnit_elementType    10
+#define Z_ProxUnit_byte           11   /* v3 only */
+} Z_ProximityOperator;
+
+typedef struct Z_Operator
+{
+    int which;
+#define Z_Operator_and 0
+#define Z_Operator_or 1
+#define Z_Operator_and_not 2
+#define Z_Operator_prox 3
+    union
+    {
+       Odr_null *and;          /* these guys are nulls. */
+       Odr_null *or;
+       Odr_null *and_not;
+       Z_ProximityOperator *prox;
+    } u;
+} Z_Operator;
+
+typedef struct Z_Operand
+{
+    int which;
+#define Z_Operand_APT 0
+#define Z_Operand_resultSetId 1
+#define Z_Operand_resultAttr             /* v3 only */ 2
+    union
+    {
+       Z_AttributesPlusTerm *attributesPlusTerm;
+       Z_ResultSetId *resultSetId;
+       Z_ResultSetPlusAttributes *resultAttr;
+    } u;
+} Z_Operand;
+
+typedef struct Z_Complex
+{
+    struct Z_RPNStructure *s1;
+    struct Z_RPNStructure *s2;
+    Z_Operator *roperator;
+} Z_Complex;
+
+typedef struct Z_RPNStructure
+{
+    int which;
+#define Z_RPNStructure_simple 0
+#define Z_RPNStructure_complex 1
+    union
+    {
+       Z_Operand *simple;
+       Z_Complex *complex;
+    } u;
+} Z_RPNStructure;
+
+typedef struct Z_RPNQuery
+{
+    Odr_oid *attributeSetId;
+    Z_RPNStructure *RPNStructure;
+} Z_RPNQuery;
+
+/* -------------------------- SEARCHREQUEST -------------------------- */
+
+typedef struct Z_Query
+{
+    int which;
+#define Z_Query_type_1 1
+#define Z_Query_type_2 2
+#define Z_Query_type_101 3
+    union
+    {
+       Z_RPNQuery *type_1;
+       Odr_oct *type_2;
+       Z_RPNQuery *type_101;
+    } u;
+} Z_Query;
+
+typedef struct Z_SearchRequest
+{
+    Z_ReferenceId *referenceId;   /* OPTIONAL */
+    int *smallSetUpperBound;
+    int *largeSetLowerBound;
+    int *mediumSetPresentNumber;
+    bool_t *replaceIndicator;
+    char *resultSetName;
+    int num_databaseNames;
+    char **databaseNames;
+    Z_ElementSetNames *smallSetElementSetNames;    /* OPTIONAL */
+    Z_ElementSetNames *mediumSetElementSetNames;    /* OPTIONAL */
+    Odr_oid *preferredRecordSyntax;  /* OPTIONAL */
+    Z_Query *query;
+    Z_OtherInformation *additionalSearchInfo;       /* OPTIONAL */
+    Z_OtherInformation *otherInfo;                  /* OPTIONAL */
+} Z_SearchRequest;
+
+/* ------------------------ RECORD -------------------------- */
+
+typedef Z_External Z_DatabaseRecord;
+
+typedef struct Z_DefaultDiagFormat
+{
+    Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
+    int *condition;
+    /* until the whole character set issue becomes more definite,
+     * you can probably ignore this on input. */
+    int which;
+#define Z_DiagForm_v2AddInfo 0
+#define Z_DiagForm_v3AddInfo 1
+    char *addinfo;
+} Z_DefaultDiagFormat;
+
+typedef struct Z_DiagRec
+{
+    int which;
+#define Z_DiagRec_defaultFormat 0
+#define Z_DiagRec_externallyDefined 1
+    union
+    {
+       Z_DefaultDiagFormat *defaultFormat;
+       Z_External *externallyDefined;
+    } u;
+} Z_DiagRec;
+
+typedef struct Z_DiagRecs
+{
+    int num_diagRecs;
+    Z_DiagRec **diagRecs;
+} Z_DiagRecs;
+
+typedef struct Z_NamePlusRecord
+{
+    char *databaseName;      /* OPTIONAL */
+    int which;
+#define Z_NamePlusRecord_databaseRecord 0
+#define Z_NamePlusRecord_surrogateDiagnostic 1
+    union
+    {
+       Z_DatabaseRecord *databaseRecord;
+       Z_DiagRec *surrogateDiagnostic;
+    } u;
+} Z_NamePlusRecord;
+
+typedef struct Z_NamePlusRecordList
+{
+    int num_records;
+    Z_NamePlusRecord **records;
+} Z_NamePlusRecordList;
+
+typedef struct Z_Records
+{
+    int which;
+#define Z_Records_DBOSD 0
+#define Z_Records_NSD 1
+#define Z_Records_multipleNSD 2
+    union
+    {
+       Z_NamePlusRecordList *databaseOrSurDiagnostics;
+       Z_DiagRec *nonSurrogateDiagnostic;
+       Z_DiagRecs *multipleNonSurDiagnostics;
+    } u;
+} Z_Records;
+
+/* ------------------------ SEARCHRESPONSE ------------------ */
+
+typedef struct Z_SearchResponse
+{
+    Z_ReferenceId *referenceId;       /* OPTIONAL */
+    int *resultCount;
+    int *numberOfRecordsReturned;
+    int *nextResultSetPosition;
+    bool_t *searchStatus;
+    int *resultSetStatus;              /* OPTIONAL */
+#define Z_RES_SUBSET        1
+#define Z_RES_INTERIM       2
+#define Z_RES_NONE          3
+    int *presentStatus;                /* OPTIONAL */
+#define Z_PRES_SUCCESS      0
+#define Z_PRES_PARTIAL_1    1
+#define Z_PRES_PARTIAL_2    2
+#define Z_PRES_PARTIAL_3    3
+#define Z_PRES_PARTIAL_4    4
+#define Z_PRES_FAILURE      5
+    Z_Records *records;                  /* OPTIONAL */
+    Z_OtherInformation *additionalSearchInfo;
+    Z_OtherInformation *otherInfo;
+} Z_SearchResponse;
+
+/* ------------------------- PRESENT SERVICE -----------------*/
+
+typedef struct Z_ElementSpec
+{
+    int which;
+#define Z_ElementSpec_elementSetName 0
+#define Z_ElementSpec_externalSpec 1
+    union
+    {
+       char *elementSetName;
+       Z_External *externalSpec;
+    } u;
+} Z_ElementSpec;
+
+typedef struct Z_Specification
+{
+    Odr_oid *schema;                  /* OPTIONAL */
+    Z_ElementSpec *elementSpec;       /* OPTIONAL */
+} Z_Specification;
+
+typedef struct Z_DbSpecific
+{
+    char *databaseName;
+    Z_Specification *spec;
+} Z_DbSpecific;
+
+typedef struct Z_CompSpec
+{
+    bool_t *selectAlternativeSyntax;
+    Z_Specification *generic;            /* OPTIONAL */
+    int num_dbSpecific;
+    Z_DbSpecific **dbSpecific;           /* OPTIONAL */
+    int num_recordSyntax;
+    Odr_oid **recordSyntax;              /* OPTIONAL */
+} Z_CompSpec;
+
+typedef struct Z_RecordComposition
+{
+    int which;
+#define Z_RecordComp_simple 0
+#define Z_RecordComp_complex 1
+    union
+    {
+       Z_ElementSetNames *simple;
+       Z_CompSpec *complex;
+    } u;
+} Z_RecordComposition;
+
+typedef struct Z_Range
+{
+    int *startingPosition;
+    int *numberOfRecords;
+} Z_Range;
+
+typedef struct Z_PresentRequest
+{
+    Z_ReferenceId *referenceId;              /* OPTIONAL */
+    Z_ResultSetId *resultSetId;
+    int *resultSetStartPoint;
+    int *numberOfRecordsRequested;
+    int num_ranges;
+    Z_Range **additionalRanges;              /* OPTIONAL */
+    Z_RecordComposition *recordComposition;  /* OPTIONAL */
+    Odr_oid *preferredRecordSyntax;  /* OPTIONAL */
+    int *maxSegmentCount;                 /* OPTIONAL */
+    int *maxRecordSize;                   /* OPTIONAL */
+    int *maxSegmentSize;                  /* OPTIONAL */
+    Z_OtherInformation *otherInfo;        /* OPTIONAL */
+} Z_PresentRequest;
+
+typedef struct Z_PresentResponse
+{
+    Z_ReferenceId *referenceId;        /* OPTIONAL */
+    int *numberOfRecordsReturned;
+    int *nextResultSetPosition;
+    int *presentStatus;
+    Z_Records *records;
+    Z_OtherInformation *otherInfo;     /* OPTIONAL */
+} Z_PresentResponse;
+
+/* ------------------ RESOURCE CONTROL ----------------*/
+
+typedef struct Z_TriggerResourceControlRequest
+{
+    Z_ReferenceId *referenceId;    /* OPTIONAL */
+    int *requestedAction;
+#define Z_TriggerResourceCtrl_resourceReport  1
+#define Z_TriggerResourceCtrl_resourceControl 2
+#define Z_TriggerResourceCtrl_cancel          3
+    Odr_oid *prefResourceReportFormat;  /* OPTIONAL */
+    bool_t *resultSetWanted;            /* OPTIONAL */
+    Z_OtherInformation *otherInfo;
+} Z_TriggerResourceControlRequest;
+
+typedef struct Z_ResourceControlRequest
+{
+    Z_ReferenceId *referenceId;    /* OPTIONAL */
+    bool_t *suspendedFlag;         /* OPTIONAL */
+    Z_External *resourceReport; /* OPTIONAL */
+    int *partialResultsAvailable;  /* OPTIONAL */
+#define Z_ResourceControlRequest_subset    1
+#define Z_ResourceControlRequest_interim   2
+#define Z_ResourceControlRequest_none      3
+    bool_t *responseRequired;
+    bool_t *triggeredRequestFlag;  /* OPTIONAL */
+    Z_OtherInformation *otherInfo;
+} Z_ResourceControlRequest;
+
+typedef struct Z_ResourceControlResponse
+{
+    Z_ReferenceId *referenceId;    /* OPTIONAL */
+    bool_t *continueFlag;
+    bool_t *resultSetWanted;       /* OPTIONAL */
+    Z_OtherInformation *otherInfo;
+} Z_ResourceControlResponse;
+
+
+/* ------------------ ACCESS CTRL SERVICE ----------------*/
+
+typedef struct Z_AccessControlRequest
+{
+    Z_ReferenceId *referenceId;           /* OPTIONAL */
+    int which;
+#define Z_AccessRequest_simpleForm 0
+#define Z_AccessRequest_externallyDefined 1
+    union
+    {
+       Odr_oct *simpleForm;
+       Z_External *externallyDefined;
+    } u;
+    Z_OtherInformation *otherInfo;           /* OPTIONAL */
+} Z_AccessControlRequest;
+
+typedef struct Z_AccessControlResponse
+{
+    Z_ReferenceId *referenceId;              /* OPTIONAL */
+    int which;
+#define Z_AccessResponse_simpleForm 0
+#define Z_AccessResponse_externallyDefined 1
+    union
+    {
+       Odr_oct *simpleForm;
+       Z_External *externallyDefined;
+    } u;
+    Z_DiagRec *diagnostic;                   /* OPTIONAL */
+    Z_OtherInformation *otherInfo;           /* OPTIONAL */
+} Z_AccessControlResponse;
+
+/* ------------------------ SCAN SERVICE -------------------- */
+
+typedef struct Z_AttributeList
+{
+    int num_attributes;
+    Z_AttributeElement **attributes;
+} Z_AttributeList;
+
+typedef struct Z_AlternativeTerm
+{
+    int num_terms;
+    Z_AttributesPlusTerm **terms;
+} Z_AlternativeTerm;
+
+typedef struct Z_ByDatabase
+{
+    char *db;
+    int *num;                           /* OPTIONAL */
+    Z_OtherInformation *otherDbInfo;    /* OPTIONAL */
+} Z_ByDatabase;
+
+typedef struct Z_ByDatabaseList
+{
+    int num_elements;
+    Z_ByDatabase **elements;
+} Z_ByDatabaseList;
+
+typedef struct Z_ScanOccurrences
+{
+    int which;
+#define Z_ScanOccurrences_global         0
+#define Z_ScanOccurrences_byDatabase     1
+    union
+    {
+       int *global;
+       Z_ByDatabaseList *byDatabase;
+    } u;
+
+} Z_ScanOccurrences;
+
+typedef struct Z_OccurrenceByAttributesElem
+{
+    Z_AttributeList *attributes;
+    Z_ScanOccurrences *occurrences;         /* OPTIONAL */
+    Z_OtherInformation *otherOccurInfo;      /* OPTIONAL */
+} Z_OccurrenceByAttributesElem;
+
+typedef struct Z_OccurrenceByAttributes
+{
+    int num_elements;
+    Z_OccurrenceByAttributesElem **elements;
+} Z_OccurrenceByAttributes;
+
+typedef struct Z_TermInfo
+{
+    Z_Term *term;
+    char *displayTerm;                     /* OPTIONAL */
+    Z_AttributeList *suggestedAttributes;  /* OPTIONAL */
+    Z_AlternativeTerm *alternativeTerm;    /* OPTIONAL */
+    int *globalOccurrences;                /* OPTIONAL */
+    Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */
+    Z_OtherInformation *otherTermInfo;      /* OPTIONAL */
+} Z_TermInfo;
+
+typedef struct Z_Entry
+{
+    int which;
+#define Z_Entry_termInfo 0
+#define Z_Entry_surrogateDiagnostic 1
+    union
+    {
+       Z_TermInfo *termInfo;
+       Z_DiagRec *surrogateDiagnostic;
+    } u;
+} Z_Entry;
+
+#ifdef BUGGY_LISTENTRIES
+
+typedef struct Z_Entries
+{
+    int num_entries;
+    Z_Entry **entries;
+} Z_Entries;
+
+typedef struct Z_ListEntries
+{
+    int which;
+#define Z_ListEntries_entries 0
+#define Z_ListEntries_nonSurrogateDiagnostics 1
+    union
+    {
+       Z_Entries *entries;
+       Z_DiagRecs *nonSurrogateDiagnostics;
+    } u;
+} Z_ListEntries;
+
+#endif
+
+typedef struct Z_ListEntries {
+       int num_entries;
+       Z_Entry **entries; /* OPT */
+       int num_nonsurrogateDiagnostics;
+       Z_DiagRec **nonsurrogateDiagnostics; /* OPT */
+} Z_ListEntries;
+
+typedef struct Z_ScanRequest
+{
+    Z_ReferenceId *referenceId;       /* OPTIONAL */
+    int num_databaseNames;
+    char **databaseNames;
+    Odr_oid *attributeSet;          /* OPTIONAL */
+    Z_AttributesPlusTerm *termListAndStartPoint;
+    int *stepSize;                    /* OPTIONAL */
+    int *numberOfTermsRequested;
+    int *preferredPositionInResponse;   /* OPTIONAL */
+    Z_OtherInformation *otherInfo;
+} Z_ScanRequest;
+
+typedef struct Z_ScanResponse
+{
+    Z_ReferenceId *referenceId;       /* OPTIONAL */
+    int *stepSize;                    /* OPTIONAL */
+    int *scanStatus;
+#define Z_Scan_success      0
+#define Z_Scan_partial_1    1
+#define Z_Scan_partial_2    2
+#define Z_Scan_partial_3    3
+#define Z_Scan_partial_4    4
+#define Z_Scan_partial_5    5
+#define Z_Scan_failure      6
+    int *numberOfEntriesReturned;
+    int *positionOfTerm;              /* OPTIONAL */
+    Z_ListEntries *entries;           /* OPTIONAL */
+    Odr_oid *attributeSet;            /* OPTIONAL */
+    Z_OtherInformation *otherInfo;
+} Z_ScanResponse; 
+
+
+/* ------------------------ DELETE -------------------------- */
+
+#define Z_DeleteStatus_success                          0
+#define Z_DeleteStatus_resultSetDidNotExist             1
+#define Z_DeleteStatus_previouslyDeletedByTarget        2
+#define Z_DeleteStatus_systemProblemAtTarget            3
+#define Z_DeleteStatus_accessNotAllowed                 4
+#define Z_DeleteStatus_resourceControlAtOrigin          5
+#define Z_DeleteStatus_resourceControlAtTarget          6
+#define Z_DeleteStatus_bulkDeleteNotSupported           7
+#define Z_DeleteStatus_notAllRsltSetsDeletedOnBulkDlte  8
+#define Z_DeleteStatus_notAllRequestedResultSetsDeleted 9
+#define Z_DeleteStatus_resultSetInUse                  10
+
+typedef struct Z_ListStatus
+{
+    Z_ResultSetId *id;
+    int *status;
+} Z_ListStatus;
+
+typedef struct Z_DeleteResultSetRequest
+{
+    Z_ReferenceId *referenceId;        /* OPTIONAL */
+    int *deleteFunction;
+#define Z_DeleteRequest_list    0
+#define Z_DeleteRequest_all     1
+    int num_resultSetList;
+    Z_ResultSetId **resultSetList;      /* OPTIONAL */
+    Z_OtherInformation *otherInfo;
+} Z_DeleteResultSetRequest;
+
+typedef struct Z_ListStatuses {
+    int num;
+    Z_ListStatus **elements;
+} Z_ListStatuses;
+
+typedef struct Z_DeleteResultSetResponse
+{
+    Z_ReferenceId *referenceId;        /* OPTIONAL */
+    int *deleteOperationStatus;
+    Z_ListStatuses *deleteListStatuses;/* OPTIONAL */
+    int *numberNotDeleted;             /* OPTIONAL */
+    Z_ListStatuses *bulkStatuses;      /* OPTIONAL */
+    char *deleteMessage;               /* OPTIONAL */
+    Z_OtherInformation *otherInfo;
+} Z_DeleteResultSetResponse;
+
+/* ------------------------ CLOSE SERVICE ------------------- */
+
+typedef struct Z_Close
+{
+    Z_ReferenceId *referenceId;         /* OPTIONAL */
+    int *closeReason;
+#define Z_Close_finished           0
+#define Z_Close_shutdown           1
+#define Z_Close_systemProblem      2
+#define Z_Close_costLimit          3
+#define Z_Close_resources          4
+#define Z_Close_securityViolation  5
+#define Z_Close_protocolError      6
+#define Z_Close_lackOfActivity     7
+#define Z_Close_peerAbort          8
+#define Z_Close_unspecified        9
+    char *diagnosticInformation;          /* OPTIONAL */
+    Odr_oid *resourceReportFormat;        /* OPTIONAL */
+    Z_External *resourceReport;         /* OPTIONAL */
+    Z_OtherInformation *otherInfo;        /* OPTIONAL */
+} Z_Close;
+
+/* ------------------------ SEGMENTATION -------------------- */
+
+typedef struct Z_Segment
+{
+    Z_ReferenceId *referenceId;   /* OPTIONAL */
+    int *numberOfRecordsReturned;
+    int num_segmentRecords;
+    Z_NamePlusRecord **segmentRecords;
+    Z_OtherInformation *otherInfo;  /* OPTIONAL */
+} Z_Segment;
+
+/* ----------------------- Extended Services ---------------- */
+
+typedef struct Z_Permissions
+{
+    char *userId;                         
+    int num_allowableFunctions;
+    int **allowableFunctions;             
+#define Z_Permissions_delete              1
+#define Z_Permissions_modifyContents      2
+#define Z_Permissions_modifyPermissions   3
+#define Z_Permissions_present             4
+#define Z_Permissions_invoke              5
+} Z_Permissions;
+
+typedef struct Z_ExtendedServicesRequest
+{
+    Z_ReferenceId *referenceId;             /* OPTIONAL */
+    int *function;                        
+#define Z_ExtendedServicesRequest_create              1
+#define Z_ExtendedServicesRequest_delete              2
+#define Z_ExtendedServicesRequest_modify              3
+    Odr_oid *packageType;                 
+    char *packageName;                      /* OPTIONAL */
+    char *userId;                           /* OPTIONAL */
+    Z_IntUnit *retentionTime;               /* OPTIONAL */
+    Z_Permissions *permissions;             /* OPTIONAL */
+    char *description;                      /* OPTIONAL */
+    Z_External *taskSpecificParameters;     /* OPTIONAL */
+    int *waitAction;                      
+#define Z_ExtendedServicesRequest_wait                1
+#define Z_ExtendedServicesRequest_waitIfPossible      2
+#define Z_ExtendedServicesRequest_dontWait            3
+#define Z_ExtendedServicesRequest_dontReturnPackage   4
+    char *elements;             /* OPTIONAL */
+    Z_OtherInformation *otherInfo;          /* OPTIONAL */
+} Z_ExtendedServicesRequest;
+
+typedef struct Z_ExtendedServicesResponse
+{
+    Z_ReferenceId *referenceId;             /* OPTIONAL */
+    int *operationStatus;                 
+#define Z_ExtendedServicesResponse_done                1
+#define Z_ExtendedServicesResponse_accepted            2
+#define Z_ExtendedServicesResponse_failure             3
+    int num_diagnostics;
+    Z_DiagRec **diagnostics;                /* OPTIONAL */
+    Z_External *taskPackage;                /* OPTIONAL */
+    Z_OtherInformation *otherInfo;          /* OPTIONAL */
+} Z_ExtendedServicesResponse;
+
+/* ------------------------ Sort --------------------------- */
+
+typedef struct Z_SortAttributes
+{
+    Odr_oid *id;
+    Z_AttributeList *list;
+} Z_SortAttributes;
+
+typedef struct Z_SortKey
+{
+    int which;
+#define Z_SortKey_sortField             0
+#define Z_SortKey_elementSpec           1
+#define Z_SortKey_sortAttributes        2
+    union
+    {
+       char *sortField;
+       Z_Specification *elementSpec;
+       Z_SortAttributes *sortAttributes;
+    } u;
+} Z_SortKey;
+
+typedef struct Z_SortDbSpecific
+{
+    char *databaseName;
+    Z_SortKey *dbSort;
+} Z_SortDbSpecific;
+
+typedef struct Z_SortDbSpecificList
+{
+    int num_dbSpecific;
+    Z_SortDbSpecific **dbSpecific;
+} Z_SortDbSpecificList;
+
+typedef struct Z_SortElement
+{
+    int which;
+#define Z_SortElement_generic               0
+#define Z_SortElement_databaseSpecific      1
+    union
+    {
+       Z_SortKey *generic;
+       Z_SortDbSpecificList *databaseSpecific;
+    } u;
+} Z_SortElement;
+
+typedef struct Z_SortMissingValueAction
+{
+    int which;
+#define Z_SortMissingValAct_abort           0
+#define Z_SortMissingValAct_null            1
+#define Z_SortMissingValAct_valData         2
+    union
+    {
+       Odr_null *abort;
+       Odr_null *null;
+       Odr_oct *valData;
+    } u;
+} Z_SortMissingValueAction;
+
+typedef struct Z_SortKeySpec
+{
+    Z_SortElement *sortElement;
+    int *sortRelation;
+#define Z_SortRelation_ascending            0
+#define Z_SortRelation_descending           1
+#define Z_SortRelation_ascendingByFreq      3
+#define Z_SortRelation_descendingByFreq     4
+    int *caseSensitivity;
+#define Z_SortCase_caseSensitive            0
+#define Z_SortCase_caseInsensitive          1
+    Z_SortMissingValueAction *missingValueAction;  /* OPTIONAL */
+} Z_SortKeySpec;
+
+typedef struct Z_SortResponse
+{
+    Z_ReferenceId *referenceId;             /* OPTIONAL */
+    int *sortStatus;
+#define Z_SortStatus_success              0
+#define Z_SortStatus_partial_1            1
+#define Z_SortStatus_failure              2
+    int *resultSetStatus;                   /* OPTIONAL */
+#define Z_SortResultSetStatus_empty       1
+#define Z_SortResultSetStatus_interim     2
+#define Z_SortResultSetStatus_unchanged   3
+#define Z_SortResultSetStatus_none        4
+    Z_DiagRecs *diagnostics;                /* OPTIONAL */
+    Z_OtherInformation *otherInfo;          /* OPTIONAL */
+} Z_SortResponse;
+
+typedef struct Z_SortKeySpecList
+{
+    int num_specs;
+    Z_SortKeySpec **specs;
+} Z_SortKeySpecList;
+
+typedef struct Z_SortRequest
+{
+    Z_ReferenceId *referenceId;             /* OPTIONAL */
+    Z_StringList *inputResultSetNames;
+    char *sortedResultSetName;
+    Z_SortKeySpecList *sortSequence;
+    Z_OtherInformation *otherInfo;          /* OPTIONAL */
+} Z_SortRequest;
+
+/* ----------------------- Resource Report ------------------ */
+
+typedef struct Z_ResourceReportRequest
+{
+    Z_ReferenceId *referenceId;             /* OPTIONAL */
+    Z_ReferenceId *opId;                    /* OPTIONAL */
+    Odr_oid *prefResourceReportFormat;      /* OPTIONAL */
+    Z_OtherInformation *otherInfo;          /* OPTIONAL */
+} Z_ResourceReportRequest;
+
+typedef struct Z_ResourceReportResponse
+{
+    Z_ReferenceId *referenceId;             /* OPTIONAL */
+    int *resourceReportStatus;
+#define Z_ResourceReportStatus_success   0
+#define Z_ResourceReportStatus_partial   1
+#define Z_ResourceReportStatus_failure_1 2
+#define Z_ResourceReportStatus_failure_2 3
+#define Z_ResourceReportStatus_failure_3 4
+#define Z_ResourceReportStatus_failure_4 5
+#define Z_ResourceReportStatus_failure_5 6
+#define Z_ResourceReportStatus_failure_6 7
+    Z_External *resourceReport;             /* OPTIONAL */
+    Z_OtherInformation *otherInfo;          /* OPTIONAL */
+} Z_ResourceReportResponse;
+
+/* ------------------------ APDU ---------------------------- */
+
+typedef struct Z_APDU
+{    
+    int which;
+#define Z_APDU_initRequest 0
+#define Z_APDU_initResponse 1
+#define Z_APDU_searchRequest 2
+#define Z_APDU_searchResponse 3
+#define Z_APDU_presentRequest 4
+#define Z_APDU_presentResponse 5
+#define Z_APDU_deleteResultSetRequest 6
+#define Z_APDU_deleteResultSetResponse 7
+#define Z_APDU_resourceControlRequest 8
+#define Z_APDU_resourceControlResponse 9
+#define Z_APDU_triggerResourceControlRequest 10
+#define Z_APDU_scanRequest 11
+#define Z_APDU_scanResponse 12
+#define Z_APDU_segmentRequest 13
+#define Z_APDU_extendedServicesRequest 14
+#define Z_APDU_extendedServicesResponse 15
+#define Z_APDU_close 16
+#define Z_APDU_accessControlRequest 17
+#define Z_APDU_accessControlResponse 18
+#define Z_APDU_sortRequest 20
+#define Z_APDU_sortResponse 21
+#define Z_APDU_resourceReportRequest 22
+#define Z_APDU_resourceReportResponse 23
+    union
+    {
+       Z_InitRequest  *initRequest;
+       Z_InitResponse *initResponse;
+       Z_SearchRequest *searchRequest;
+       Z_SearchResponse *searchResponse;
+       Z_PresentRequest *presentRequest;
+       Z_PresentResponse *presentResponse;
+       Z_DeleteResultSetRequest *deleteResultSetRequest;
+       Z_DeleteResultSetResponse *deleteResultSetResponse;
+       Z_AccessControlRequest *accessControlRequest;
+       Z_AccessControlResponse *accessControlResponse;
+       Z_ResourceControlRequest *resourceControlRequest;
+       Z_ResourceControlResponse *resourceControlResponse;
+       Z_TriggerResourceControlRequest *triggerResourceControlRequest;
+       Z_ResourceReportRequest *resourceReportRequest;
+       Z_ResourceReportResponse *resourceReportResponse;
+       Z_ScanRequest *scanRequest;
+       Z_ScanResponse *scanResponse;
+       Z_SortRequest *sortRequest;
+       Z_SortResponse *sortResponse;
+       Z_Segment *segmentRequest;
+       Z_ExtendedServicesRequest *extendedServicesRequest;
+       Z_ExtendedServicesResponse *extendedServicesResponse;
+       Z_Close *close;
+    } u;
+} Z_APDU;
+
+#define z_APDU z_APDU_old
+
+YAZ_EXPORT int z_APDU(ODR o, Z_APDU **p, int opt, const char *name);
+YAZ_EXPORT int z_SUTRS(ODR o, Odr_oct **p, int opt, const char *name);
+
+YAZ_EXPORT Z_InitRequest *zget_InitRequest(ODR o);
+YAZ_EXPORT Z_InitResponse *zget_InitResponse(ODR o);
+YAZ_EXPORT Z_SearchRequest *zget_SearchRequest(ODR o);
+YAZ_EXPORT Z_SearchResponse *zget_SearchResponse(ODR o);
+YAZ_EXPORT Z_PresentRequest *zget_PresentRequest(ODR o);
+YAZ_EXPORT Z_PresentResponse *zget_PresentResponse(ODR o);
+YAZ_EXPORT Z_DeleteResultSetRequest *zget_DeleteResultSetRequest(ODR o);
+YAZ_EXPORT Z_DeleteResultSetResponse *zget_DeleteResultSetResponse(ODR o);
+YAZ_EXPORT Z_ScanRequest *zget_ScanRequest(ODR o);
+YAZ_EXPORT Z_ScanResponse *zget_ScanResponse(ODR o);
+YAZ_EXPORT Z_TriggerResourceControlRequest *zget_TriggerResourceControlRequest(ODR o);
+YAZ_EXPORT Z_ResourceControlRequest *zget_ResourceControlRequest(ODR o);
+YAZ_EXPORT Z_ResourceControlResponse *zget_ResourceControlResponse(ODR o);
+YAZ_EXPORT Z_Close *zget_Close(ODR o);
+YAZ_EXPORT int z_StringList(ODR o, Z_StringList **p, int opt,
+                           const char *name);
+YAZ_EXPORT int z_InternationalString(ODR o, char **p, int opt,
+                                    const char *name);
+YAZ_EXPORT int z_OtherInformation(ODR o, Z_OtherInformation **p, int opt,
+                                 const char *naem);
+YAZ_EXPORT int z_ElementSetName(ODR o, char **p, int opt, const char *name);
+YAZ_EXPORT int z_IntUnit(ODR o, Z_IntUnit **p, int opt, const char *name);
+YAZ_EXPORT int z_Unit(ODR o, Z_Unit **p, int opt, const char *name);
+YAZ_EXPORT int z_DatabaseName(ODR o, Z_DatabaseName **p, int opt,
+                             const char *name);
+YAZ_EXPORT int z_StringOrNumeric(ODR o, Z_StringOrNumeric **p, int opt,
+                                const char *name);
+YAZ_EXPORT int z_OtherInformationUnit(ODR o, Z_OtherInformationUnit **p,
+                                     int opt, const char *name);
+YAZ_EXPORT int z_Term(ODR o, Z_Term **p, int opt, const char *name);
+YAZ_EXPORT int z_Specification(ODR o, Z_Specification **p, int opt,
+                              const char *name);
+YAZ_EXPORT int z_Permissions(ODR o, Z_Permissions **p, int opt,
+                            const char *name);
+YAZ_EXPORT int z_DiagRec(ODR o, Z_DiagRec **p, int opt, const char *name);
+YAZ_EXPORT int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt, const char *name);
+YAZ_EXPORT int z_AttributeList(ODR o, Z_AttributeList **p, int opt,
+                              const char *name);
+YAZ_EXPORT int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt,
+                                  const char *name);
+YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
+YAZ_EXPORT int z_Query(ODR o, Z_Query **p, int opt, const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <yaz/prt-rsc.h>
+#include <yaz/prt-acc.h>
+#include <yaz/prt-exp.h>
+#include <yaz/prt-grs.h>
+#include <yaz/prt-arc.h>
+#include <yaz/prt-exd.h>
+#include <yaz/prt-dia.h>
+#include <yaz/prt-esp.h>
+#include <yaz/prt-add.h>
+
+#include <yaz/prt-dat.h>
+#include <yaz/prt-univ.h>
+#include <yaz/prt-ext.h>
+
+#endif
diff --git a/include/yaz/prt-rsc.h b/include/yaz/prt-rsc.h
new file mode 100644 (file)
index 0000000..3018388
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: prt-rsc.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7  1999/04/20 09:56:48  adam
+ * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
+ * Modified all encoders/decoders to reflect this change.
+ *
+ * Revision 1.6  1997/05/14 06:53:50  adam
+ * C++ support.
+ *
+ * Revision 1.5  1995/09/29 17:12:11  quinn
+ * Smallish
+ *
+ * Revision 1.4  1995/09/27  15:02:52  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.3  1995/08/17  12:45:17  quinn
+ * Fixed minor problems with GRS-1. Added support in c&s.
+ *
+ * Revision 1.2  1995/06/02  09:49:50  quinn
+ * Add access control
+ *
+ * Revision 1.1  1995/06/01  11:24:52  quinn
+ * Resource Control
+ *
+ *
+ */
+
+#ifndef PRT_RSC_H
+#define PRT_RSC_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* -------------------- Resource-1 -------------------- */
+
+#define Z_EstimateType_currentSearchRecords           1
+#define Z_EstimateType_finalSearchRecords             2
+#define Z_EstimateType_currentPresentRecords          3
+#define Z_EstimateType_finalPresentRecords            4
+#define Z_EstimateType_currentOpTimeProcessing        5
+#define Z_EstimateType_finalOpTimeProcessing          6
+#define Z_EstimateType_currentAssocTime               7
+#define Z_EstimateType_currentOperationCost           8
+#define Z_EstimateType_finalOperationCost             9
+#define Z_EstimateType_currentAssocCost              10
+#define Z_EstimateType_finalOpTimeElapsed            11
+#define Z_EstimateType_percentComplete               12
+#define Z_EstimateType_currentSearchAssCost          13
+#define Z_EstimateType_currentPresentAssCost         14
+#define Z_EstimateType_currentConnectAssCost         15
+#define Z_EstimateType_currentOtherAssCost           16
+
+typedef struct Z_Estimate1
+{
+    int *type;
+    int *value;
+    int *currencyCode;             /* OPTIONAL */
+} Z_Estimate1;
+
+typedef struct Z_ResourceReport1
+{
+    int num_estimates;
+    Z_Estimate1 **estimates;
+    char *message;
+} Z_ResourceReport1;
+
+int z_ResourceReport1(ODR o, Z_ResourceReport1 **p, int opt, const char *name);
+
+/* -------------------- Resource-2 -------------------- */
+
+typedef struct Z_Estimate2
+{
+    Z_StringOrNumeric *type;      /* same as in estimate1, if numeric */
+    Z_IntUnit *value;
+} Z_Estimate2;
+
+typedef struct Z_ResourceReport2
+{
+    int num_estimates;
+    Z_Estimate2 **estimates;             /* OPTIONAL */
+    char *message;                       /* OPTIONAL */
+} Z_ResourceReport2;
+
+int z_ResourceReport2(ODR o, Z_ResourceReport2 **p, int opt, const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/prt-univ.h b/include/yaz/prt-univ.h
new file mode 100644 (file)
index 0000000..d431f50
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 1998
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef PRT_UNIV_H
+#define PRT_UNIV_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* YC 0.1: Fri Mar 20 14:28:54 CET 1998 */
+/* Module-H ResourceReport-Format-Universe-1 */
+
+typedef struct Z_UniverseReportHits Z_UniverseReportHits;
+int z_UniverseReportHits (ODR o, Z_UniverseReportHits **p, int opt,
+                         const char *name);
+
+typedef struct Z_UniverseReportDuplicate Z_UniverseReportDuplicate;
+int z_UniverseReportDuplicate (ODR o, Z_UniverseReportDuplicate **p, int opt,
+                              const char *name);
+
+typedef struct Z_UniverseReport Z_UniverseReport;
+int z_UniverseReport (ODR o, Z_UniverseReport **p, int opt,
+                     const char *name);
+
+struct Z_UniverseReportHits {
+       Z_StringOrNumeric *database;
+       Z_StringOrNumeric *hits;
+};
+
+struct Z_UniverseReportDuplicate {
+       Z_StringOrNumeric *hitno;
+};
+
+struct Z_UniverseReport {
+       int *totalHits;
+       int which;
+       union {
+               Z_UniverseReportHits *databaseHits;
+               Z_UniverseReportDuplicate *duplicate;
+#define Z_UniverseReport_databaseHits 1
+#define Z_UniverseReport_duplicate 2
+       } u;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/readconf.h b/include/yaz/readconf.h
new file mode 100644 (file)
index 0000000..123dba7
--- /dev/null
@@ -0,0 +1,23 @@
+
+#ifndef READCONF_H
+#define READCONF_H
+
+#include <stdio.h>
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+YAZ_EXPORT int readconf(char *name, void *rprivate,
+                        int (*fun)(char *name, void *rprivate,
+                                  int argc, char *argv[]));
+
+YAZ_EXPORT int readconf_line(FILE *f, int *lineno,
+                            char *line, int len, char *argv[], int num);
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/statserv.h b/include/yaz/statserv.h
new file mode 100644 (file)
index 0000000..0bea9f9
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: statserv.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.17  1999/07/06 12:17:15  adam
+ * Added option -1 that runs server once (for profiling purposes).
+ *
+ * Revision 1.16  1999/06/10 11:45:30  adam
+ * Added bend_start, bend_stop handlers and removed pre_init.
+ * Handlers bend_start/bend_stop are called when service/daemon is
+ * started/stopped.
+ *
+ * Revision 1.15  1999/04/16 14:45:55  adam
+ * Added interface for tcpd wrapper for access control.
+ *
+ * Revision 1.14  1999/02/02 13:57:32  adam
+ * Uses preprocessor define WIN32 instead of WINDOWS to build code
+ * for Microsoft WIN32.
+ *
+ * Revision 1.13  1998/02/10 10:28:56  adam
+ * Added app_name, service_dependencies, service_display_name and
+ * options_func. options_func allows us to specify a different function
+ * to interogate the command line arguments. The other members allow us
+ * to pass the full service details accross to the service manager (CW).
+ *
+ * Revision 1.??? 1997/12/18   Chas
+ * Added app_name, service_dependencies, service_display_name and 
+ * options_func. options_func allows us to specify a different function 
+ * to interogate the command line arguments. The other members allow us
+ * to pass the full service details accross to the service manager.
+ *
+ * Revision 1.12  1997/11/07 13:31:47  adam
+ * Added NT Service name part of statserv_options_block. Moved NT
+ * service utility to server library.
+ *
+ * Revision 1.11  1997/10/27 14:03:01  adam
+ * Added new member to statserver_options_block, pre_init, which
+ * specifies a callback to be invoked after command line parsing and
+ * before the server listens for the first time.
+ *
+ * Revision 1.10  1997/09/01 09:31:26  adam
+ * Removed definition statserv_remove to eventl.h. (A hack really).
+ *
+ * Revision 1.9  1997/09/01 08:49:53  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.8  1997/05/14 06:53:51  adam
+ * C++ support.
+ *
+ * Revision 1.7  1995/09/29 17:12:12  quinn
+ * Smallish
+ *
+ * Revision 1.6  1995/09/27  15:02:53  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.5  1995/06/19  12:38:31  quinn
+ * Reorganized include-files. Added small features.
+ *
+ * Revision 1.4  1995/06/15  07:45:08  quinn
+ * Moving to v3.
+ *
+ * Revision 1.3  1995/05/16  08:50:38  quinn
+ * License, documentation, and memory fixes
+ *
+ *
+ */
+
+#ifndef STATSERVER_H
+#define STATSERVER_H
+
+#include <yaz/yconfig.h>
+#include <yaz/odr.h>
+#include <yaz/oid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+typedef struct statserv_options_block
+{
+    int dynamic;                  /* fork on incoming requests */
+    int one_shot;                 /* one session then exit(1) */
+    int loglevel;                 /* desired logging-level */
+    char apdufile[ODR_MAXNAME+1]; /* file for pretty-printed PDUs */
+    char logfile[ODR_MAXNAME+1];  /* file for diagnostic output */
+    char default_listen[1024];    /* 0 == no default listen */
+    enum oid_proto default_proto; /* PROTO_SR or PROTO_Z3950 */
+    int idle_timeout;             /* how many minutes to wait before closing */
+    int maxrecordsize;            /* maximum value for negotiation */
+    char configname[ODR_MAXNAME+1];  /* given to the backend in bend_init */
+    char setuid[ODR_MAXNAME+1];     /* setuid to this user after binding */
+    void (*bend_start)(struct statserv_options_block *p);
+    void (*bend_stop)(struct statserv_options_block *p);
+    int (*options_func)(int argc, char **argv);
+    int (*check_ip)(void *cd, const char *addr, int len, int type);
+    char daemon_name[128];
+    int inetd;                    /* Do we use the inet deamon or not */
+    
+#ifdef WIN32
+    /* We only have these members for the windows version */
+    /* They seemed a bit large to have them there in general */
+    char service_name[128];         /* NT Service Name */
+    char app_name[128];             /* Application Name */
+    char service_dependencies[128]; /* The services we are dependent on */
+    char service_display_name[128]; /* The service display name */
+#endif /* WIN32 */
+} statserv_options_block;
+    
+int statserv_main(int argc, char **argv);
+int statserv_start(int argc, char **argv);
+void statserv_closedown(void);
+statserv_options_block *statserv_getcontrol(void);
+void statserv_setcontrol(statserv_options_block *block);
+
+int check_ip_tcpd(void *cd, const char *addr, int len, int type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/tcpip.h b/include/yaz/tcpip.h
new file mode 100644 (file)
index 0000000..d985d03
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: tcpip.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.13  1999/06/16 11:55:24  adam
+ * Added APDU log to client.
+ *
+ * Revision 1.12  1999/01/08 11:23:19  adam
+ * Added const modifier to some of the BER/ODR encoding routines.
+ *
+ * Revision 1.11  1998/06/22 11:32:38  adam
+ * Added 'conditional cs_listen' feature.
+ *
+ * Revision 1.10  1998/05/18 13:07:01  adam
+ * Changed the way attribute sets are handled by the retriaval module.
+ * Extended Explain conversion / schema.
+ * Modified server and client to work with ASN.1 compiled protocol handlers.
+ *
+ * Revision 1.9  1997/09/01 08:49:54  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.8  1997/05/14 06:53:52  adam
+ * C++ support.
+ *
+ * Revision 1.7  1996/07/06 19:58:32  quinn
+ * System headerfiles gathered in yconfig
+ *
+ * Revision 1.6  1996/02/10  12:23:42  quinn
+ * Enable inetd operations fro TCP/IP stack
+ *
+ * Revision 1.5  1995/09/29  17:12:13  quinn
+ * Smallish
+ *
+ * Revision 1.4  1995/09/28  10:12:36  quinn
+ * Windows-support changes
+ *
+ * Revision 1.3  1995/09/27  15:02:53  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.2  1995/05/16  08:50:39  quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.1  1995/03/30  09:39:43  quinn
+ * Moved .h files to include directory
+ *
+ * Revision 1.3  1995/03/27  08:36:11  quinn
+ * Some work on nonblocking operation in xmosi.c and rfct.c.
+ * Added protocol parameter to cs_create()
+ *
+ * Revision 1.2  1995/03/14  10:28:43  quinn
+ * Adding server-side support to tcpip.c and fixing bugs in nonblocking I/O
+ *
+ * Revision 1.1  1995/02/09  15:51:52  quinn
+ * Works better now.
+ *
+ */
+
+#ifndef TCPIP_H
+#define TCPIP_H
+
+#include <yaz/comstack.h>
+#include <yaz/oid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT int completeWAIS(const unsigned char *buf, int len);
+YAZ_EXPORT struct sockaddr_in *tcpip_strtoaddr(const char *str);
+YAZ_EXPORT COMSTACK tcpip_type(int s, int blocking, int protocol);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/tpath.h b/include/yaz/tpath.h
new file mode 100644 (file)
index 0000000..f93ba63
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1995-1997, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: tpath.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.4  1997/10/31 12:20:08  adam
+ * Improved memory debugging for xmalloc/nmem.c. References to NMEM
+ * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
+ * Bug fix: missing fclose in data1_read_espec1.
+ *
+ */
+
+#ifndef TPATH_H
+#define TPATH_H
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT FILE *yaz_path_fopen(const char *path,
+                               const char *name, const char *mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/wrbuf.h b/include/yaz/wrbuf.h
new file mode 100644 (file)
index 0000000..66ede8c
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 1995-1997, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: wrbuf.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1999/11/03 09:05:56  adam
+ * Implemented wrbuf_puts.
+ *
+ * Revision 1.7  1999/08/27 09:40:32  adam
+ * Renamed logf function to yaz_log. Removed VC++ project files.
+ *
+ * Revision 1.6  1997/10/31 12:20:08  adam
+ * Improved memory debugging for xmalloc/nmem.c. References to NMEM
+ * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
+ * Bug fix: missing fclose in data1_read_espec1.
+ *
+ * Revision 1.5  1997/09/17 12:10:32  adam
+ * YAZ version 1.4.
+ *
+ */
+
+#ifndef WRBUF_H
+#define WRBUF_H
+
+#include <yaz/xmalloc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct wrbuf
+{
+    char *buf;
+    int pos;
+    int size;
+} wrbuf, *WRBUF;
+
+YAZ_EXPORT WRBUF wrbuf_alloc(void);
+YAZ_EXPORT void wrbuf_free(WRBUF b, int free_buf);
+YAZ_EXPORT void wrbuf_rewind(WRBUF b);
+YAZ_EXPORT int wrbuf_grow(WRBUF b, int minsize);
+YAZ_EXPORT int wrbuf_write(WRBUF b, const char *buf, int size);
+YAZ_EXPORT int wrbuf_puts(WRBUF b, const char *buf);
+
+#define wrbuf_len(b) ((b)->pos)
+#define wrbuf_buf(b) ((b)->buf)
+
+#define wrbuf_putc(b, c) \
+    (((b)->pos >= (b)->size ? wrbuf_grow(b, 1) : 0),  \
+    (b)->buf[(b)->pos++] = (c), 0)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/xmalloc.h b/include/yaz/xmalloc.h
new file mode 100644 (file)
index 0000000..ae159d1
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 1995-1999, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The names of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: xmalloc.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.6  1999/07/13 13:24:53  adam
+ * Updated memory debugging memory allocatation routines.
+ *
+ * Revision 1.5  1998/07/20 12:36:22  adam
+ * Minor changes.
+ *
+ * Revision 1.4  1997/10/31 12:20:08  adam
+ * Improved memory debugging for xmalloc/nmem.c. References to NMEM
+ * instead of ODR in n ESPEC-1 handling in source d1_espec.c.
+ * Bug fix: missing fclose in data1_read_espec1.
+ *
+ * Revision 1.3  1997/09/01 08:49:54  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.2  1997/05/14 06:53:53  adam
+ * C++ support.
+ *
+ * Revision 1.1  1995/11/01 11:55:41  quinn
+ * Added xmalloc.c
+ *
+ * Revision 1.8  1995/10/16  14:03:07  quinn
+ * Changes to support element set names and espec1
+ *
+ * Revision 1.7  1994/10/05  10:15:18  quinn
+ * Added xrealloc.
+ *
+ * Revision 1.6  1994/09/26  16:31:24  adam
+ * Minor changes. xmalloc declares xcalloc now.
+ *
+ * Revision 1.5  1994/09/19  15:46:34  quinn
+ * Added stdlib.h
+ *
+ * Revision 1.4  1994/08/18  08:22:27  adam
+ * Res.h modified. xmalloc now declares xstrdup.
+ *
+ * Revision 1.3  1994/08/17  15:34:15  adam
+ * Initial version of resource manager.
+ *
+ * Revision 1.2  1994/08/17  14:09:48  quinn
+ * Small changes
+ *
+ * Revision 1.1  1994/08/17  13:39:07  adam
+ * Added xmalloc header.
+ *
+ * Revision 1.1  1994/08/16  16:16:02  adam
+ * bfile header created.
+ *
+ */
+
+#ifndef XMALLOC_H
+#define XMALLOC_H
+
+#include <sys/types.h>
+#include <stdlib.h>
+
+#include <yaz/yconfig.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define xrealloc(o, x) xrealloc_f(o, x, __FILE__, __LINE__)
+#define xmalloc(x) xmalloc_f(x, __FILE__, __LINE__)
+#define xcalloc(x,y) xcalloc_f(x,y, __FILE__, __LINE__)
+#define xfree(x) xfree_f(x, __FILE__, __LINE__)
+#define xstrdup(s) xstrdup_f(s, __FILE__, __LINE__)
+#define xmalloc_trav(s) xmalloc_trav_f(s, __FILE__, __LINE__)
+    
+YAZ_EXPORT void *xrealloc_f (void *o, size_t size, const char *file, int line);
+YAZ_EXPORT void *xmalloc_f (size_t size, const char *file, int line);
+YAZ_EXPORT void *xcalloc_f (size_t nmemb, size_t size,
+                           const char *file, int line);
+YAZ_EXPORT char *xstrdup_f (const char *p, const char *file, int line);
+YAZ_EXPORT void xfree_f (void *p, const char *file, int line);
+YAZ_EXPORT void xmalloc_trav_f(const char *s, const char *file, int line);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/xmosi.h b/include/yaz/xmosi.h
new file mode 100644 (file)
index 0000000..b41b113
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: xmosi.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7  1999/06/16 11:55:24  adam
+ * Added APDU log to client.
+ *
+ * Revision 1.6  1997/05/14 06:53:53  adam
+ * C++ support.
+ *
+ * Revision 1.5  1996/02/10 12:23:43  quinn
+ * Enable inetd operations fro TCP/IP stack
+ *
+ * Revision 1.4  1995/09/29  17:12:13  quinn
+ * Smallish
+ *
+ * Revision 1.3  1995/09/27  15:02:53  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.2  1995/05/16  08:50:39  quinn
+ * License, documentation, and memory fixes
+ *
+ * Revision 1.1  1995/03/30  09:39:43  quinn
+ * Moved .h files to include directory
+ *
+ * Revision 1.3  1995/03/27  08:36:16  quinn
+ * Some work on nonblocking operation in xmosi.c and rfct.c.
+ * Added protocol parameter to cs_create()
+ *
+ * Revision 1.2  1995/03/14  10:28:48  quinn
+ * Adding server-side support to tcpip.c and fixing bugs in nonblocking I/O
+ *
+ * Revision 1.1  1995/03/01  08:40:33  quinn
+ * First working version of rfct. Addressing needs work.
+ *
+ */
+
+#ifndef XMOSI_H
+#define XMOSI_H
+
+#include <comstack.h>
+#include <stdio.h>
+#include <xti.h>
+#include <xti92.h>
+#include <xtiUser.h>
+#include <mosi.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct netbuf *mosi_strtoaddr(const char *str);
+
+COMSTACK mosi_type(int s, int blocking, int protocol);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/yaz-ccl.h b/include/yaz/yaz-ccl.h
new file mode 100644 (file)
index 0000000..2ef4fb9
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation, in whole or in part, for any purpose, is hereby granted,
+ * provided that:
+ *
+ * 1. This copyright and permission notice appear in all copies of the
+ * software and its documentation. Notices of copyright or attribution
+ * which appear at the beginning of any file must remain unchanged.
+ *
+ * 2. The name of Index Data or the individual authors may not be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
+ * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * $Log: yaz-ccl.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1997/09/01 08:49:54  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.7  1997/06/23 10:30:45  adam
+ * Added ODR stream as parameter to ccl_rpn_query and ccl_scan_query.
+ *
+ * Revision 1.6  1997/05/14 06:53:54  adam
+ * C++ support.
+ *
+ * Revision 1.5  1995/09/29 17:12:14  quinn
+ * Smallish
+ *
+ * Revision 1.4  1995/09/27  15:02:54  quinn
+ * Modified function heads & prototypes.
+ *
+ * Revision 1.3  1995/05/16  08:50:40  quinn
+ * License, documentation, and memory fixes
+ *
+ *
+ */
+
+#ifndef YAZ_CCL_H
+#define YAZ_CCL_H
+
+#include <yaz/yconfig.h>
+#include <yaz/proto.h>
+#include <yaz/ccl.h>
+#include <yaz/odr.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT Z_RPNQuery *ccl_rpn_query (ODR o, struct ccl_rpn_node *p);
+YAZ_EXPORT Z_AttributesPlusTerm *ccl_scan_query (ODR o, struct ccl_rpn_node *p);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/yaz-util.h b/include/yaz/yaz-util.h
new file mode 100644 (file)
index 0000000..c6f3019
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1995-1997, Index Data.
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * $Log: yaz-util.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.6  1997/10/27 13:52:46  adam
+ * Header yaz-util includes all YAZ utility header files.
+ *
+ * Revision 1.5  1997/09/04 07:58:36  adam
+ * Added prototype for atoi_n.
+ *
+ * Revision 1.4  1997/09/01 08:49:54  adam
+ * New windows NT/95 port using MSV5.0. To export DLL functions the
+ * YAZ_EXPORT modifier was added. Defined in yconfig.h.
+ *
+ * Revision 1.3  1997/05/14 06:53:54  adam
+ * C++ support.
+ *
+ * Revision 1.2  1996/02/20 17:58:09  adam
+ * Added const to yaz_matchstr.
+ *
+ * Revision 1.1  1996/02/20  16:32:49  quinn
+ * Created util file.
+ */
+
+#ifndef YAZ_UTIL_H
+#define YAZ_UTIL_H
+
+#include <yaz/yconfig.h>
+#include <yaz/xmalloc.h>
+#include <yaz/log.h>
+#include <yaz/tpath.h>
+#include <yaz/options.h>
+#include <yaz/wrbuf.h>
+#include <yaz/nmem.h>
+#include <yaz/readconf.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+YAZ_EXPORT int yaz_matchstr(const char *s1, const char *s2);
+YAZ_EXPORT int atoi_n (const char *buf, int len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/yaz/yaz-version.h b/include/yaz/yaz-version.h
new file mode 100644 (file)
index 0000000..b9d9867
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Current software version.
+ *
+ * $Log: yaz-version.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.18  1998/06/26 11:17:23  quinn
+ * v2+
+ *
+ * Revision 1.17  1998/01/30 15:32:57  adam
+ * 1.4pl2.
+ *
+ * Revision 1.16  1998/01/29 13:28:23  adam
+ * YAZ version 1.4pl1.
+ *
+ * Revision 1.15  1997/09/17 12:10:33  adam
+ * YAZ version 1.4.
+ *
+ * Revision 1.14  1997/04/30 08:52:09  quinn
+ * Null
+ *
+ * Revision 1.13  1996/10/11  15:06:55  quinn
+ * Version 1.3
+ *
+ * Revision 1.12  1996/06/10  08:57:50  quinn
+ * 1.2
+ *
+ * Revision 1.11  1996/04/10  11:40:33  quinn
+ * 1.1pl2
+ *
+ * Revision 1.10  1996/02/20  12:57:45  quinn
+ * V1.1
+ *
+ * Revision 1.9  1996/01/24  16:01:24  quinn
+ * pl4
+ *
+ * Revision 1.8  1996/01/02  11:46:50  quinn
+ * Changed 'operator' to 'roperator' to avoid C++ conflict.
+ * Moved to pl3
+ *
+ * Revision 1.7  1995/12/06  15:50:42  quinn
+ * 1.0pl2
+ *
+ * Revision 1.6  1995/12/05  11:15:57  quinn
+ * 1.0pl1
+ *
+ * Revision 1.5  1995/11/28  09:31:22  quinn
+ * Version 1.0
+ *
+ * Revision 1.4  1995/08/24  15:13:18  quinn
+ * Beta 3
+ *
+ * Revision 1.3  1995/06/27  13:12:07  quinn
+ * v1.0b2
+ * See CHANGELOG for update info now.
+ *
+ * Revision 1.2  1995/06/19  13:39:16  quinn
+ * 1.0 beta
+ * All of basic 1995 should be in place at this point. Some little features
+ * added to make the server more useful. BER dumper for bad protocol debugging.
+ * Etc. First major release. All following releases should come with
+ * a changelog.
+ *
+ * Revision 1.1  1995/06/14  12:34:55  quinn
+ * Moved version.h to include/
+ *
+ * Revision 1.4  1995/06/07  14:43:57  quinn
+ * Various work towards first public release. Specifically, the CLOSE
+ * service has been added.
+ *
+ * Revision 1.3  1995/05/29  09:52:38  quinn
+ * Second pre-release.
+ *
+ * Revision 1.2  1995/05/16  10:22:47  quinn
+ * 0.1 beta
+ * Fairly stable version with structure in place for asynchronous server
+ * activity (the backend doesn't have complete support for this yet).
+ *
+ * Revision 1.1  1995/05/16  08:49:38  quinn
+ * Introduced version control
+ *
+ */
+
+#ifndef YAZ_VERSION
+#define YAZ_VERSION "1.5"
+#endif
diff --git a/include/yaz/yconfig.h b/include/yaz/yconfig.h
new file mode 100644 (file)
index 0000000..394b7a0
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef YCONFIG_H
+#define YCONFIG_H
+
+/* System includes */
+
+#ifndef _VMS_
+
+#ifdef WIN32
+
+#ifdef YNETINCLUDE
+#include <winsock.h>
+#endif
+
+#else /* #ifdef WIN32 */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/wait.h>
+
+#ifdef YNETINCLUDE
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+#endif
+
+#ifdef _AIX
+#include <sys/select.h>
+#endif
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+#endif
+#endif /* ifndef _VMS_ */
+
+#ifndef YAZ_EXPORT
+#ifdef WIN32
+#define YAZ_EXPORT __declspec(dllexport)
+#else
+#define YAZ_EXPORT
+#endif
+#endif
+
+#endif
diff --git a/include/yaz/z-proto.h b/include/yaz/z-proto.h
new file mode 100644 (file)
index 0000000..87c71b4
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 1998-1999, Index Data
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * $Log: z-proto.h,v $
+ * Revision 1.1  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1999/06/09 10:52:11  adam
+ * Added YAZ_EXPORT.
+ *
+ * Revision 1.1  1999/06/08 13:11:55  adam
+ * Fixed problem with proto.h.
+ *
+ * Revision 1.2  1999/04/20 10:37:04  adam
+ * Updated for ODR - added name parameter.
+ *
+ * Revision 1.1  1998/03/31 16:04:05  adam
+ * First version of proto.h which is almost compatible with the old one.
+ *
+ */
+#ifndef Z_PROTO_H
+#define Z_PROTO_H
+
+#define Z_95 1
+#define ASN_COMPILED 1
+
+#include <yaz/yaz-version.h>
+#include <yaz/z-accdes1-p.h>
+#include <yaz/z-accform1-p.h>
+#include <yaz/z-acckrb1-p.h>
+#include <yaz/z-core-p.h>
+#include <yaz/z-diag1-p.h>
+#include <yaz/z-espec1-p.h>
+#include <yaz/z-estask-p.h>
+#include <yaz/z-exp-p.h>
+#include <yaz/z-grs-p.h>
+#include <yaz/z-opac-p.h>
+#include <yaz/z-rrf1-p.h>
+#include <yaz/z-rrf2-p.h>
+#include <yaz/z-sum-p.h>
+#include <yaz/z-sutrs-p.h>
+#include <yaz/z-uifr1-p.h>
+#include <yaz/zes-expi-p.h>
+#include <yaz/zes-exps-p.h>
+#include <yaz/zes-order-p.h>
+#include <yaz/zes-pquery-p.h>
+#include <yaz/zes-psched-p.h>
+#include <yaz/zes-pset-p.h>
+#include <yaz/zes-update-p.h>
+#include <yaz/z-date-p.h>
+#include <yaz/z-univ-p.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define Z_PRES_SUCCESS   Z_PresentStatus_success
+#define Z_PRES_PARTIAL_1 Z_PresentStatus_partial_1
+#define Z_PRES_PARTIAL_2 Z_PresentStatus_partial_2
+#define Z_PRES_PARTIAL_3 Z_PresentStatus_partial_3
+#define Z_PRES_PARTIAL_4 Z_PresentStatus_partial_4
+#define Z_PRES_FAILURE   Z_PresentStatus_failure
+
+#define Z_RES_SUBSET  Z_SearchResponse_subset
+#define Z_RES_INTERIM Z_SearchResponse_interim
+#define Z_RES_NONE    Z_SearchResponse_none
+
+#define Z_SortStatus_success Z_SortResponse_success 
+#define Z_SortStatus_partial_1 Z_SortResponse_partial_1
+#define Z_SortStatus_failure Z_SortResponse_failure
+
+#define Z_SortRelation_ascending            Z_SortKeySpec_ascending 
+#define Z_SortRelation_descending           Z_SortKeySpec_descending
+#define Z_SortRelation_ascendingByFreq      Z_SortKeySpec_ascendingByFrequency
+#define Z_SortRelation_descendingByFreq     Z_SortKeySpec_descendingByfrequency 
+
+#define Z_SortCase_caseSensitive            Z_SortKeySpec_caseSensitive
+#define Z_SortCase_caseInsensitive          Z_SortKeySpec_descendingByfrequency
+
+#define Z_TriggerResourceCtrl_resourceReport Z_TriggerResourceControlRequest_resourceReport
+#define Z_TriggerResourceCtrl_resourceControl  Z_TriggerResourceControlRequest_resourceControl
+#define Z_TriggerResourceCtrl_cancel Z_TriggerResourceControlRequest_cancel
+
+#define Z_DeleteRequest_list    Z_DeleteResultSetRequest_list
+#define Z_DeleteRequest_all     Z_DeleteResultSetRequest_all
+
+#define Z_AccessRequest_simpleForm Z_AccessControlRequest_simpleForm
+#define Z_AccessRequest_externallyDefined Z_AccessControlRequest_externallyDefined
+
+#define Z_AccessResponse_simpleForm Z_AccessControlResponse_simpleForm
+#define Z_AccessResponse_externallyDefined Z_AccessControlResponse_externallyDefined
+
+#define Z_ResourceReportStatus_success   Z_ResourceReportResponse_success
+#define Z_ResourceReportStatus_partial   Z_ResourceReportResponse_partial
+#define Z_ResourceReportStatus_failure_1 Z_ResourceReportResponse_failure_1
+#define Z_ResourceReportStatus_failure_2 Z_ResourceReportResponse_failure_2
+#define Z_ResourceReportStatus_failure_3 Z_ResourceReportResponse_failure_3
+#define Z_ResourceReportStatus_failure_4 Z_ResourceReportResponse_failure_4
+#define Z_ResourceReportStatus_failure_5 Z_ResourceReportResponse_failure_5
+#define Z_ResourceReportStatus_failure_6 Z_ResourceReportResponse_failure_6
+
+#define Z_SortResultSetStatus_empty       Z_SortResponse_empty
+#define Z_SortResultSetStatus_interim     Z_SortResponse_interim
+#define Z_SortResultSetStatus_unchanged   Z_SortResponse_unchanged
+#define Z_SortResultSetStatus_none        Z_SortResponse_none
+
+typedef Z_External Z_DatabaseRecord;
+typedef struct Z_IOItemOrder Z_ItemOrder;
+
+YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
+YAZ_EXPORT Z_Close *zget_Close (ODR o);
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <yaz/prt-ext.h>
+
+#endif
diff --git a/include/yconfig.h b/include/yconfig.h
deleted file mode 100644 (file)
index 394b7a0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef YCONFIG_H
-#define YCONFIG_H
-
-/* System includes */
-
-#ifndef _VMS_
-
-#ifdef WIN32
-
-#ifdef YNETINCLUDE
-#include <winsock.h>
-#endif
-
-#else /* #ifdef WIN32 */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/wait.h>
-
-#ifdef YNETINCLUDE
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <arpa/inet.h>
-#endif
-
-#ifdef _AIX
-#include <sys/select.h>
-#endif
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-#endif
-#endif /* ifndef _VMS_ */
-
-#ifndef YAZ_EXPORT
-#ifdef WIN32
-#define YAZ_EXPORT __declspec(dllexport)
-#else
-#define YAZ_EXPORT
-#endif
-#endif
-
-#endif
diff --git a/include/z-proto.h b/include/z-proto.h
deleted file mode 100644 (file)
index 4d50f84..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 1998-1999, Index Data
- * See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: z-proto.h,v $
- * Revision 1.2  1999-06-09 10:52:11  adam
- * Added YAZ_EXPORT.
- *
- * Revision 1.1  1999/06/08 13:11:55  adam
- * Fixed problem with proto.h.
- *
- * Revision 1.2  1999/04/20 10:37:04  adam
- * Updated for ODR - added name parameter.
- *
- * Revision 1.1  1998/03/31 16:04:05  adam
- * First version of proto.h which is almost compatible with the old one.
- *
- */
-#ifndef Z_PROTO_H
-#define Z_PROTO_H
-
-#define Z_95 1
-#define ASN_COMPILED 1
-
-#include <yaz-version.h>
-#include <z-accdes1-p.h>
-#include <z-accform1-p.h>
-#include <z-acckrb1-p.h>
-#include <z-core-p.h>
-#include <z-diag1-p.h>
-#include <z-espec1-p.h>
-#include <z-estask-p.h>
-#include <z-exp-p.h>
-#include <z-grs-p.h>
-#include <z-opac-p.h>
-#include <z-rrf1-p.h>
-#include <z-rrf2-p.h>
-#include <z-sum-p.h>
-#include <z-sutrs-p.h>
-#include <z-uifr1-p.h>
-#include <zes-expi-p.h>
-#include <zes-exps-p.h>
-#include <zes-order-p.h>
-#include <zes-pquery-p.h>
-#include <zes-psched-p.h>
-#include <zes-pset-p.h>
-#include <zes-update-p.h>
-#include <z-date-p.h>
-#include <z-univ-p.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define Z_PRES_SUCCESS   Z_PresentStatus_success
-#define Z_PRES_PARTIAL_1 Z_PresentStatus_partial_1
-#define Z_PRES_PARTIAL_2 Z_PresentStatus_partial_2
-#define Z_PRES_PARTIAL_3 Z_PresentStatus_partial_3
-#define Z_PRES_PARTIAL_4 Z_PresentStatus_partial_4
-#define Z_PRES_FAILURE   Z_PresentStatus_failure
-
-#define Z_RES_SUBSET  Z_SearchResponse_subset
-#define Z_RES_INTERIM Z_SearchResponse_interim
-#define Z_RES_NONE    Z_SearchResponse_none
-
-#define Z_SortStatus_success Z_SortResponse_success 
-#define Z_SortStatus_partial_1 Z_SortResponse_partial_1
-#define Z_SortStatus_failure Z_SortResponse_failure
-
-#define Z_SortRelation_ascending            Z_SortKeySpec_ascending 
-#define Z_SortRelation_descending           Z_SortKeySpec_descending
-#define Z_SortRelation_ascendingByFreq      Z_SortKeySpec_ascendingByFrequency
-#define Z_SortRelation_descendingByFreq     Z_SortKeySpec_descendingByfrequency 
-
-#define Z_SortCase_caseSensitive            Z_SortKeySpec_caseSensitive
-#define Z_SortCase_caseInsensitive          Z_SortKeySpec_descendingByfrequency
-
-#define Z_TriggerResourceCtrl_resourceReport Z_TriggerResourceControlRequest_resourceReport
-#define Z_TriggerResourceCtrl_resourceControl  Z_TriggerResourceControlRequest_resourceControl
-#define Z_TriggerResourceCtrl_cancel Z_TriggerResourceControlRequest_cancel
-
-#define Z_DeleteRequest_list    Z_DeleteResultSetRequest_list
-#define Z_DeleteRequest_all     Z_DeleteResultSetRequest_all
-
-#define Z_AccessRequest_simpleForm Z_AccessControlRequest_simpleForm
-#define Z_AccessRequest_externallyDefined Z_AccessControlRequest_externallyDefined
-
-#define Z_AccessResponse_simpleForm Z_AccessControlResponse_simpleForm
-#define Z_AccessResponse_externallyDefined Z_AccessControlResponse_externallyDefined
-
-#define Z_ResourceReportStatus_success   Z_ResourceReportResponse_success
-#define Z_ResourceReportStatus_partial   Z_ResourceReportResponse_partial
-#define Z_ResourceReportStatus_failure_1 Z_ResourceReportResponse_failure_1
-#define Z_ResourceReportStatus_failure_2 Z_ResourceReportResponse_failure_2
-#define Z_ResourceReportStatus_failure_3 Z_ResourceReportResponse_failure_3
-#define Z_ResourceReportStatus_failure_4 Z_ResourceReportResponse_failure_4
-#define Z_ResourceReportStatus_failure_5 Z_ResourceReportResponse_failure_5
-#define Z_ResourceReportStatus_failure_6 Z_ResourceReportResponse_failure_6
-
-#define Z_SortResultSetStatus_empty       Z_SortResponse_empty
-#define Z_SortResultSetStatus_interim     Z_SortResponse_interim
-#define Z_SortResultSetStatus_unchanged   Z_SortResponse_unchanged
-#define Z_SortResultSetStatus_none        Z_SortResponse_none
-
-typedef Z_External Z_DatabaseRecord;
-typedef struct Z_IOItemOrder Z_ItemOrder;
-
-YAZ_EXPORT Z_APDU *zget_APDU(ODR o, int which);
-YAZ_EXPORT Z_Close *zget_Close (ODR o);
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <prt-ext.h>
-
-#endif
index bebfbb3..a669294 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_any.c,v $
- * Revision 1.15  1999-01-08 11:23:20  adam
+ * Revision 1.16  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.15  1999/01/08 11:23:20  adam
  * Added const modifier to some of the BER/ODR encoding routines.
  *
  * Revision 1.14  1998/02/11 11:53:34  adam
@@ -52,7 +55,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 int ber_any(ODR o, Odr_any **p)
 {
index 1b5f667..3ab4ed0 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_bit.c,v $
- * Revision 1.9  1999-04-20 09:56:48  adam
+ * Revision 1.10  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.9  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -36,7 +39,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 int ber_bitstring(ODR o, Odr_bitmask *p, int cons)
 {
index 646a27f..cee4090 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_bool.c,v $
- * Revision 1.8  1995-09-29 17:12:16  quinn
+ * Revision 1.9  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1995/09/29 17:12:16  quinn
  * Smallish
  *
  * Revision 1.7  1995/09/27  15:02:55  quinn
@@ -32,8 +35,7 @@
  */
 
 #include <stdio.h>
-#include <odr.h>
-
+#include <yaz/odr.h>
 
 int ber_boolean(ODR o, int *val)
 {
index 7e88778..09ed5a4 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_int.c,v $
- * Revision 1.14  1999-05-26 07:49:35  adam
+ * Revision 1.15  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.14  1999/05/26 07:49:35  adam
  * C++ compilation.
  *
  * Revision 1.13  1999/01/08 11:23:22  adam
  *
  */
 
+#include <string.h>
 
 #define YNETINCLUDE
-#include <yconfig.h>
-
-#include <string.h>
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 static int ber_encinteger(ODR o, int val);
 static int ber_decinteger(const unsigned char *buf, int *val);
index e772e73..c9ff2fe 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_len.c,v $
- * Revision 1.7  1999-01-08 11:23:23  adam
+ * Revision 1.8  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7  1999/01/08 11:23:23  adam
  * Added const modifier to some of the BER/ODR encoding routines.
  *
  * Revision 1.6  1995/09/29 17:12:17  quinn
@@ -20,7 +23,7 @@
  */
 
 #include <stdio.h>
-#include <odr.h>
+#include <yaz/odr.h>
 
 /*
  * Encode BER length octets. If exact, lenlen is the exact desired
index c39e9aa..ef5871e 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_null.c,v $
- * Revision 1.8  1995-09-29 17:12:18  quinn
+ * Revision 1.9  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1995/09/29 17:12:18  quinn
  * Smallish
  *
  * Revision 1.7  1995/09/27  15:02:55  quinn
@@ -31,7 +34,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 /*
  * BER-en/decoder for NULL type.
index 6fde920..91c0e9d 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_oct.c,v $
- * Revision 1.13  1999-04-20 09:56:48  adam
+ * Revision 1.14  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.13  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -47,7 +50,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 int ber_octetstring(ODR o, Odr_oct *p, int cons)
 {
index 20435c6..92208d0 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_oid.c,v $
- * Revision 1.9  1995-09-29 17:12:19  quinn
+ * Revision 1.10  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.9  1995/09/29 17:12:19  quinn
  * Smallish
  *
  * Revision 1.8  1995/09/27  15:02:56  quinn
@@ -34,7 +37,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 int ber_oidc(ODR o, Odr_oid *p)
 {
index dcfd8ae..840ff58 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: ber_tag.c,v $
- * Revision 1.19  1999-01-08 11:23:25  adam
+ * Revision 1.20  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.19  1999/01/08 11:23:25  adam
  * Added const modifier to some of the BER/ODR encoding routines.
  *
  * Revision 1.18  1998/02/11 11:53:34  adam
@@ -67,7 +70,7 @@
  */
 
 #include <stdio.h>
-#include <odr.h>
+#include <yaz/odr.h>
 
 /* ber_tag
  * On encoding:
index 62a1735..fa3734f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: dumpber.c,v $
- * Revision 1.10  1999-01-08 11:23:26  adam
+ * Revision 1.11  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.10  1999/01/08 11:23:26  adam
  * Added const modifier to some of the BER/ODR encoding routines.
  *
  * Revision 1.9  1998/01/14 09:53:26  quinn
@@ -37,8 +40,8 @@
  *
  */
 
-#include <odr.h>
 #include <stdio.h>
+#include <yaz/odr.h>
 
 static int do_dumpBER(FILE *f, const char *buf, int len, int level, int offset)
 {
index a2e443c..520673d 100644 (file)
--- a/odr/odr.c
+++ b/odr/odr.c
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr.c,v $
- * Revision 1.30  1999-08-27 09:40:32  adam
+ * Revision 1.31  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.30  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.29  1999/04/27 08:34:10  adam
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <xmalloc.h>
-#include <odr.h>
+#include <yaz/xmalloc.h>
+#include <yaz/odr.h>
 
 Odr_null *ODR_NULLVAL = "NULL";  /* the presence of a null value */
 
@@ -153,7 +156,7 @@ void odr_setprint(ODR o, FILE *file)
     o->print = file;
 }
 
-#include <log.h>
+#include <yaz/log.h>
 
 ODR odr_createmem(int direction)
 {
index c8dc02a..b5a1dcd 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_any.c,v $
- * Revision 1.8  1999-04-20 09:56:48  adam
+ * Revision 1.9  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -31,7 +34,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 /*
  * This is a catch-all type. It stuffs a random ostring (assumed to be properly
index 1631f88..d744e54 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_bit.c,v $
- * Revision 1.12  1999-04-20 09:56:48  adam
+ * Revision 1.13  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.12  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -44,8 +47,8 @@
  *
  */
 
-#include <odr.h>
 #include <string.h>
+#include <yaz/odr.h>
 
 /*
  * Top level bitstring string en/decoder.
index 3508c17..51bb366 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_bool.c,v $
- * Revision 1.10  1999-04-20 09:56:48  adam
+ * Revision 1.11  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.10  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -38,7 +41,7 @@
  */
 
 #include <stdio.h>
-#include <odr.h>
+#include <yaz/odr.h>
 
 /*
  * Top level boolean en/decoder.
index 1ad923a..81ceb84 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_choice.c,v $
- * Revision 1.16  1999-04-20 09:56:48  adam
+ * Revision 1.17  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.16  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -56,7 +59,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp,
               const char *name)
index 1664320..360e831 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_cons.c,v $
- * Revision 1.19  1999-04-20 09:56:48  adam
+ * Revision 1.20  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.19  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -65,8 +68,8 @@
  *
  */
 
-#include <odr.h>
 #include <assert.h>
+#include <yaz/odr.h>
 
 void odr_setlenlen(ODR o, int len)
 {
index 17a4a82..f24f51a 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_enum.c,v $
- * Revision 1.3  1999-04-20 09:56:48  adam
+ * Revision 1.4  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.3  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -16,7 +19,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 /*
  * Top level enum en/decoder.
index 57e7847..334609a 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_int.c,v $
- * Revision 1.13  1999-04-20 09:56:48  adam
+ * Revision 1.14  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.13  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -46,7 +49,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 /*
  * Top level integer en/decoder.
index 1572152..77af041 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_mem.c,v $
- * Revision 1.15  1999-03-31 11:18:25  adam
+ * Revision 1.16  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.15  1999/03/31 11:18:25  adam
  * Implemented odr_strdup. Added Reference ID to backend server API.
  *
  * Revision 1.14  1998/07/20 12:38:15  adam
@@ -54,8 +57,8 @@
  */
 
 #include <stdlib.h>
-#include <odr.h>
-#include <xmalloc.h>
+#include <yaz/odr.h>
+#include <yaz/xmalloc.h>
 
 /* ------------------------ NIBBLE MEMORY ---------------------- */
 
index de285fa..35d6628 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_null.c,v $
- * Revision 1.11  1999-04-20 09:56:48  adam
+ * Revision 1.12  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.11  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -41,7 +44,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 /*
  * Top level null en/decoder.
index af93ebb..4146c5b 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_oct.c,v $
- * Revision 1.14  1999-10-19 12:35:55  adam
+ * Revision 1.15  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.14  1999/10/19 12:35:55  adam
  * Better dump of OCTET STRING.
  *
  * Revision 1.13  1999/04/20 09:56:48  adam
@@ -49,7 +52,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 /*
  * Top level octet string en/decoder.
index 7d147f2..70b8a16 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_oid.c,v $
- * Revision 1.14  1999-04-20 09:56:48  adam
+ * Revision 1.15  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.14  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -50,8 +53,8 @@
  *
  */
 
-#include <odr.h>
-#include <oid.h>
+#include <yaz/odr.h>
+#include <yaz/oid.h>
 
 /*
  * Top level oid en/decoder.
index da42b35..1373e19 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_seq.c,v $
- * Revision 1.24  1999-04-20 09:56:48  adam
+ * Revision 1.25  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.24  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -81,8 +84,8 @@
  *
  */
 
-#include <odr.h>
 #include <assert.h>
+#include <yaz/odr.h>
 
 int odr_sequence_begin(ODR o, void *p, int size, const char *name)
 {
index 3642f46..543d529 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_tag.c,v $
- * Revision 1.9  1998-02-11 11:53:34  adam
+ * Revision 1.10  1999-11-30 13:47:11  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.9  1998/02/11 11:53:34  adam
  * Changed code so that it compiles as C++.
  *
  * Revision 1.8  1997/05/14 06:53:59  adam
@@ -33,7 +36,7 @@
  *
  */
 
-#include <odr.h>
+#include <yaz/odr.h>
 
 int odr_peektag(ODR o, int *zclass, int *tag, int *cons)
 {
index 4916bbe..2ac7ab2 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_use.c,v $
- * Revision 1.9  1999-04-20 09:56:48  adam
+ * Revision 1.10  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.9  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -34,8 +37,7 @@
  *
  */
 
-#include <odr.h>
-#include <odr_use.h>
+#include <yaz/odr.h>
 
 int odr_external(ODR o, Odr_external **p, int opt, const char *name)
 {
index bfffe83..dc280d7 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: odr_util.c,v $
- * Revision 1.16  1999-04-20 09:56:48  adam
+ * Revision 1.17  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.16  1999/04/20 09:56:48  adam
  * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
  * Modified all encoders/decoders to reflect this change.
  *
@@ -27,8 +30,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-#include <odr.h>
-#include <oid.h>
+#include <yaz/odr.h>
+#include <yaz/oid.h>
 
 void odr_prname(ODR o, const char *name)
 {
index a89eb91..38843d2 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_absyn.c,v $
- * Revision 1.25  1999-10-21 12:06:29  adam
+ * Revision 1.26  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.25  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.24  1999/08/27 09:40:32  adam
 #include <stdlib.h>
 #include <string.h>
 
-#include <oid.h>
-#include <log.h>
-#include <data1.h>
+#include <yaz/oid.h>
+#include <yaz/log.h>
+#include <yaz/data1.h>
 
 #define D1_MAX_NESTING  128
 
index 81d7682..2009647 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_attset.c,v $
- * Revision 1.13  1999-10-21 12:06:29  adam
+ * Revision 1.14  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.13  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.12  1999/08/27 09:40:32  adam
@@ -58,9 +61,9 @@
 #include <assert.h>
 #include <stdlib.h>
 
-#include <log.h>
-#include <d1_attset.h>
-#include <data1.h>
+#include <yaz/log.h>
+#include <yaz/d1_attset.h>
+#include <yaz/data1.h>
 
 data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, char *name)
 {
index 62a4d1d..6c583da 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_doespec.c,v $
- * Revision 1.13  1999-08-27 09:40:32  adam
+ * Revision 1.14  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.13  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.12  1999/04/23 13:34:33  adam
 
 
 #include <assert.h>
-#include <oid.h>
-#include <log.h>
-#include <proto.h>
-#include <data1.h>
+
+#include <yaz/oid.h>
+#include <yaz/log.h>
+#include <yaz/proto.h>
+#include <yaz/data1.h>
 
 static int match_children(data1_handle dh, data1_node *n,
                          Z_Espec1 *e, int i, Z_ETagUnit **t,
index 48d54f3..4b0ee90 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_espec.c,v $
- * Revision 1.17  1999-10-21 12:06:29  adam
+ * Revision 1.18  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.17  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.16  1999/08/27 09:40:32  adam
 #include <stdlib.h>
 #include <assert.h>
 #include <string.h>
-#include <odr.h>
-#include <proto.h>
-#include <log.h>
-#include <data1.h>
+
+#include <yaz/odr.h>
+#include <yaz/proto.h>
+#include <yaz/log.h>
+#include <yaz/data1.h>
 
 static Z_Variant *read_variant(int argc, char **argv, NMEM nmem,
                               const char *file, int lineno)
index 3df9694..b6e2bab 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_expout.c,v $
- * Revision 1.16  1999-08-27 09:40:32  adam
+ * Revision 1.17  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.16  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.15  1998/09/28 12:44:40  adam
@@ -65,9 +68,9 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <log.h>
-#include <proto.h>
-#include <data1.h>
+#include <yaz/log.h>
+#include <yaz/proto.h>
+#include <yaz/data1.h>
 
 typedef struct {
     data1_handle dh;
index a222aee..6530e7f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_grs.c,v $
- * Revision 1.16  1999-08-27 09:40:32  adam
+ * Revision 1.17  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.16  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.15  1999/03/31 11:18:25  adam
 #include <assert.h>
 #include <stdlib.h>
 
-#include <proto.h>
-#include <log.h>
-
-#include <data1.h>
+#include <yaz/proto.h>
+#include <yaz/log.h>
+#include <yaz/data1.h>
 
 #define D1_VARIANTARRAY 20 /* fixed max length on sup'd variant-list. Lazy me */
 
index b235cfa..966eaae 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_handle.c,v $
- * Revision 1.5  1999-08-27 09:40:32  adam
+ * Revision 1.6  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.5  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.4  1998/05/18 13:07:05  adam
@@ -26,8 +29,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <log.h>
-#include <data1.h>
+#include <yaz/log.h>
+#include <yaz/data1.h>
 
 struct data1_handle_info {
     WRBUF wrbuf;
index c7faa42..9dc5e99 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_map.c,v $
- * Revision 1.16  1999-10-21 12:06:29  adam
+ * Revision 1.17  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.16  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.15  1999/08/27 09:40:32  adam
 #include <stdlib.h>
 #include <string.h>
 
-#include <oid.h>
-#include <log.h>
-#include <readconf.h>
-
-#include <tpath.h>
-#include <data1.h>
-#include <d1_map.h>
+#include <yaz/oid.h>
+#include <yaz/log.h>
+#include <yaz/readconf.h>
+#include <yaz/tpath.h>
+#include <yaz/data1.h>
+#include <yaz/d1_map.h>
 
 data1_maptab *data1_read_maptab (data1_handle dh, const char *file)
 {
index 4ddf45e..0bf408f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_marc.c,v $
- * Revision 1.15  1999-10-21 12:06:29  adam
+ * Revision 1.16  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.15  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.14  1999/08/27 09:40:32  adam
 #include <stdlib.h>
 #include <string.h>
 
-#include <oid.h>
-#include <log.h>
-#include <marcdisp.h>
-#include <readconf.h>
-#include <xmalloc.h>
-#include <data1.h>
-#include <tpath.h>
+#include <yaz/oid.h>
+#include <yaz/log.h>
+#include <yaz/marcdisp.h>
+#include <yaz/readconf.h>
+#include <yaz/xmalloc.h>
+#include <yaz/data1.h>
+#include <yaz/tpath.h>
 
 data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
 {
index 8ed42c3..2165168 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_prtree.c,v $
- * Revision 1.5  1999-01-25 13:49:47  adam
+ * Revision 1.6  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.5  1999/01/25 13:49:47  adam
  * Made data1_pr_tree make better printing of data1 buffers.
  *
  * Revision 1.4  1998/05/18 13:07:06  adam
@@ -23,8 +26,8 @@
  *
  */
 
-#include <log.h>
-#include <data1.h>
+#include <yaz/log.h>
+#include <yaz/data1.h>
 
 static void pr_string (FILE *out, const char *str, int len)
 {
index 92b1b59..e73f946 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_read.c,v $
- * Revision 1.29  1999-10-21 12:06:29  adam
+ * Revision 1.30  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.29  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.28  1999/10/21 09:50:33  adam
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <xmalloc.h>
-#include <log.h>
-#include <data1.h>
+#include <yaz/xmalloc.h>
+#include <yaz/log.h>
+#include <yaz/data1.h>
 
 /*
  * get the tag which is the immediate parent of this node (this may mean
index e67d671..9737a32 100644 (file)
@@ -1,10 +1,13 @@
 /*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1999, Index Data.
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_soif.c,v $
- * Revision 1.3  1997-09-17 12:10:37  adam
+ * Revision 1.4  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.3  1997/09/17 12:10:37  adam
  * YAZ version 1.4.
  *
  * Revision 1.2  1997/04/30 08:52:11  quinn
@@ -16,9 +19,8 @@
  *
  */
 
-#include <wrbuf.h>
-
-#include <data1.h>
+#include <yaz/wrbuf.h>
+#include <yaz/data1.h>
 
 /*
  * This module generates SOIF (Simple Object Interchange Format) records
index fec514e..4c477d6 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_sumout.c,v $
- * Revision 1.4  1999-08-27 09:40:32  adam
+ * Revision 1.5  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.4  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.3  1998/02/11 11:53:35  adam
@@ -23,9 +26,9 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <log.h>
-#include <proto.h>
-#include <data1.h>
+#include <yaz/log.h>
+#include <yaz/proto.h>
+#include <yaz/data1.h>
 
 static int *f_integer(data1_node *c, ODR o)
 {
index fea2d02..7cf3e1f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_sutrs.c,v $
- * Revision 1.5  1999-10-21 12:06:29  adam
+ * Revision 1.6  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.5  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.4  1997/09/17 12:10:38  adam
@@ -22,7 +25,7 @@
  *
  */
 
-#include <data1.h>
+#include <yaz/data1.h>
 
 #define NTOBUF_INDENT   2
 #define NTOBUF_MARGIN 75
index f02ed58..2a1a330 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_tagset.c,v $
- * Revision 1.13  1999-10-21 12:06:29  adam
+ * Revision 1.14  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.13  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.12  1999/08/27 09:40:32  adam
@@ -59,8 +62,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <log.h>
-#include <data1.h>
+#include <yaz/log.h>
+#include <yaz/data1.h>
 
 /*
  * We'll probably want to add some sort of hashed index to these lookup-
index 5b07f68..6332a56 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_varset.c,v $
- * Revision 1.9  1999-08-27 09:40:32  adam
+ * Revision 1.10  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.9  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.8  1998/10/13 16:09:54  adam
 #include <string.h>
 #include <stdlib.h>
 
-#include <oid.h>
-#include <log.h>
-
-#include <data1.h>
+#include <yaz/oid.h>
+#include <yaz/log.h>
+#include <yaz/data1.h>
 
 data1_vartype *data1_getvartypebyct (data1_handle dh, data1_varset *set,
                                     char *zclass, char *type)
index 3990c14..4d4b7b3 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_write.c,v $
- * Revision 1.7  1999-10-21 12:06:29  adam
+ * Revision 1.8  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7  1999/10/21 12:06:29  adam
  * Retrieval module no longer uses ctype.h - functions.
  *
  * Revision 1.6  1999/07/06 12:16:00  adam
@@ -32,8 +35,8 @@
 
 #include <string.h>
 
-#include <data1.h>
-#include <wrbuf.h>
+#include <yaz/data1.h>
+#include <yaz/wrbuf.h>
 
 #define IDSGML_MARGIN 75
 
index 8ea125a..6ad0ef3 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: eventl.c,v $
- * Revision 1.28  1999-08-27 09:40:32  adam
+ * Revision 1.29  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.28  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.27  1999/02/02 13:57:34  adam
@@ -94,7 +97,6 @@
  *
  */
 
-#include <yconfig.h>
 #include <stdio.h>
 #include <assert.h>
 #ifdef WIN32
 #include <errno.h>
 #include <string.h>
 
-#include <log.h>
-#include <comstack.h>
-#include <xmalloc.h>
+#include <yaz/yconfig.h>
+#include <yaz/log.h>
+#include <yaz/comstack.h>
+#include <yaz/xmalloc.h>
 #include "eventl.h"
 #include "session.h"
-#include <statserv.h>
+#include <yaz/statserv.h>
 
 IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags)
 {
index f3eeaa4..380fb41 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: requestq.c,v $
- * Revision 1.6  1998-02-11 11:53:35  adam
+ * Revision 1.7  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.6  1998/02/11 11:53:35  adam
  * Changed code so that it compiles as C++.
  *
  * Revision 1.5  1998/02/10 11:03:56  adam
@@ -37,7 +40,7 @@
 
 #include <stdlib.h>
 
-#include <xmalloc.h>
+#include <yaz/xmalloc.h>
 #include "session.h"
 
 void request_enq(request_q *q, request *r)
index 86ed6b7..04157d2 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: seshigh.c,v $
- * Revision 1.98  1999-11-29 15:12:27  adam
+ * Revision 1.99  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.98  1999/11/29 15:12:27  adam
  * Changed the way implementationName - and version is set.
  *
  * Revision 1.96  1999/11/04 14:58:44  adam
 #endif
 #include <assert.h>
 
-#include <yconfig.h>
-#include <xmalloc.h>
-#include <comstack.h>
+#include <yaz/yconfig.h>
+#include <yaz/xmalloc.h>
+#include <yaz/comstack.h>
 #include "eventl.h"
 #include "session.h"
-#include <proto.h>
-#include <oid.h>
-#include <log.h>
-#include <logrpn.h>
-#include <statserv.h>
+#include <yaz/proto.h>
+#include <yaz/oid.h>
+#include <yaz/log.h>
+#include <yaz/logrpn.h>
+#include <yaz/statserv.h>
 
-#include <backend.h>
+#include <yaz/backend.h>
 
 static int process_request(association *assoc, request *req, char **msg);
 void backend_response(IOCHAN i, int event);
index deb4c20..45146c6 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: session.h,v $
- * Revision 1.20  1999-10-11 10:01:24  adam
+ * Revision 1.21  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.20  1999/10/11 10:01:24  adam
  * Implemented bend_sort_rr handler for frontend server.
  *
  * Revision 1.19  1999/04/20 09:56:48  adam
 #ifndef SESSION_H
 #define SESSION_H
 
-#include <comstack.h>
-#include <odr.h>
-#include <oid.h>
-#include <proto.h>
 #include <sys/types.h>
+#include <yaz/comstack.h>
+#include <yaz/odr.h>
+#include <yaz/oid.h>
+#include <yaz/proto.h>
 #include "eventl.h"
 
 typedef enum {
index 7df2baa..000ebd8 100644 (file)
@@ -7,7 +7,10 @@
  *   Chas Woodfield, Fretwell Downing Datasystems.
  *
  * $Log: statserv.c,v $
- * Revision 1.58  1999-08-27 09:40:32  adam
+ * Revision 1.59  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.58  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.57  1999/07/06 12:17:15  adam
 #include <signal.h>
 #include <errno.h>
 
-#include <comstack.h>
-#include <tcpip.h>
-#include <options.h>
+#include <yaz/comstack.h>
+#include <yaz/tcpip.h>
+#include <yaz/options.h>
 #ifdef USE_XTIMOSI
-#include <xmosi.h>
+#include <yaz/xmosi.h>
 #endif
-#include <log.h>
+#include <yaz/log.h>
 #include "eventl.h"
 #include "session.h"
-#include <statserv.h>
+#include <yaz/statserv.h>
 
 static IOCHAN pListener = NULL;
 
index 3d629ec..16eebc1 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: tcpdchk.c,v $
- * Revision 1.3  1999-08-27 09:40:32  adam
+ * Revision 1.4  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.3  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.2  1999/04/20 09:56:48  adam
@@ -41,9 +44,9 @@ int deny_severity = LOG_WARNING;
 #include <unistd.h>
 #endif
 
-#include <comstack.h>
-#include <statserv.h>
-#include <log.h>
+#include <yaz/comstack.h>
+#include <yaz/statserv.h>
+#include <yaz/log.h>
 
 int check_ip_tcpd(void *cd, const char *addr, int len, int type)
 {
index 109b737..a0a1456 100644 (file)
@@ -1,4 +1,5 @@
-# $Id: bib1.att,v 1.8 1998-10-13 20:52:17 adam Exp $
+# $Id: bib1.att,v 1.9 1999-11-30 13:47:12 adam Exp $
+# Bib-1 Attribute Set
 name bib1
 reference Bib-1
 
index 4c4b5e8..9ff7865 100644 (file)
@@ -4,14 +4,17 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: atoin.c,v $
- * Revision 1.1  1997-09-04 07:52:27  adam
+ * Revision 1.2  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.1  1997/09/04 07:52:27  adam
  * Moved atoi_n function to separate source file.
  *
  */
 
 #include <string.h>
 #include <ctype.h>
-#include <yaz-util.h>
+#include <yaz/yaz-util.h>
 
 int atoi_n (const char *buf, int len)
 {
index f404cfc..181186d 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: log.c,v $
- * Revision 1.19  1999-08-27 09:40:32  adam
+ * Revision 1.20  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.19  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.18  1998/10/28 10:27:00  adam
 #include <stdarg.h>
 #include <errno.h>
 #include <time.h>
-#include <log.h>
+#include <yaz/log.h>
 
 #define HAS_STRERROR 1
 
index 8ed80e3..3806681 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: marcdisp.c,v $
- * Revision 1.7  1997-09-24 13:29:40  adam
+ * Revision 1.8  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7  1997/09/24 13:29:40  adam
  * Added verbose option -v to marcdump utility.
  *
  * Revision 1.6  1997/09/04 07:52:27  adam
@@ -30,8 +33,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-#include <marcdisp.h>
-#include <yaz-util.h>
+#include <yaz/marcdisp.h>
+#include <yaz/yaz-util.h>
 
 int marc_display_ex (const char *buf, FILE *outf, int debug)
 {
index 272492b..b28a838 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: marcdump.c,v $
- * Revision 1.8  1999-05-26 07:49:35  adam
+ * Revision 1.9  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1999/05/26 07:49:35  adam
  * C++ compilation.
  *
  * Revision 1.7  1998/02/11 11:53:36  adam
@@ -34,9 +37,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include <marcdisp.h>
-#include <xmalloc.h>
-#include <options.h>
+#include <yaz/marcdisp.h>
+#include <yaz/xmalloc.h>
+#include <yaz/options.h>
 
 #ifndef SEEK_SET
 #define SEEK_SET 0
index d5b5517..9be7145 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: matchstr.c,v $
- * Revision 1.3  1999-10-19 12:35:42  adam
+ * Revision 1.4  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.3  1999/10/19 12:35:42  adam
  * Minor bug fix (bug introduced by previous commit).
  *
  * Revision 1.2  1999/10/15 11:35:41  adam
@@ -43,7 +46,7 @@
 #include <stdio.h>
 #include <assert.h>
 #include <ctype.h>
-#include <yaz-util.h>
+#include <yaz/yaz-util.h>
 
 /*
  * Match strings, independently of case and occurences of '-'.
index 61fe862..c76c836 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: nmem.c,v $
- * Revision 1.18  1999-08-27 09:40:32  adam
+ * Revision 1.19  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.18  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.17  1999/07/13 13:28:25  adam
@@ -74,9 +77,9 @@
 
 #include <assert.h>
 #include <string.h>
-#include <xmalloc.h>
-#include <nmem.h>
-#include <log.h>
+#include <yaz/xmalloc.h>
+#include <yaz/nmem.h>
+#include <yaz/log.h>
 #ifdef WIN32
 #include <windows.h>
 #elif _REENTRANT
index 74841d4..d33caf9 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: nmemsdup.c,v $
- * Revision 1.2  1998-02-11 11:53:36  adam
+ * Revision 1.3  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1998/02/11 11:53:36  adam
  * Changed code so that it compiles as C++.
  *
  * Revision 1.1  1997/09/17 12:10:42  adam
@@ -13,7 +16,7 @@
  */
 
 #include <string.h>
-#include <nmem.h>
+#include <yaz/nmem.h>
 
 char *nmem_strdup (NMEM mem, const char *src)
 {
index bdfc16f..3bf45dc 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: oid.c,v $
- * Revision 1.37  1999-09-13 12:51:15  adam
+ * Revision 1.38  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.37  1999/09/13 12:51:15  adam
  * Added CLIENT IP OID.
  *
  * Revision 1.36  1999/05/27 13:02:20  adam
 #include <string.h>
 #include <ctype.h>
 
-#include <oid.h>
-#include <yaz-util.h>
+#include <yaz/oid.h>
+#include <yaz/yaz-util.h>
 
 static int z3950_prefix[] = { 1, 2, 840, 10003, -1 };
 static int sr_prefix[]    = { 1, 0, 10163, -1 };
index 0c7aa81..5c7f294 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: options.c,v $
- * Revision 1.6  1997-09-01 08:54:13  adam
+ * Revision 1.7  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.6  1997/09/01 08:54:13  adam
  * New windows NT/95 port using MSV5.0. Made prefix query handling
  * thread safe. The function options ignores empty arguments when met.
  *
@@ -33,7 +36,7 @@
  */
 #include <stdlib.h>
 
-#include <options.h>
+#include <yaz/options.h>
 
 static int arg_no = 1;
 static int arg_off = 0;
index a4d4f64..429d70e 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: readconf.c,v $
- * Revision 1.8  1999-08-27 09:40:32  adam
+ * Revision 1.9  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.8  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.7  1999/06/30 09:10:32  adam
@@ -46,8 +49,8 @@
 #include <stdio.h>
 #include <ctype.h>
 
-#include <log.h>
-#include <readconf.h>
+#include <yaz/log.h>
+#include <yaz/readconf.h>
 
 #define l_isspace(c) ((c) == '\t' || (c) == ' ' || (c) == '\n' || (c) == '\r')
 
index 58774b0..03dd264 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: tpath.c,v $
- * Revision 1.2  1996-10-29 13:36:26  adam
+ * Revision 1.3  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1996/10/29 13:36:26  adam
  * Added header.
  *
  * Revision 1.1  1995/11/01 16:35:00  quinn
@@ -15,7 +18,7 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <tpath.h>
+#include <yaz/tpath.h>
 
 FILE *yaz_path_fopen(const char *path, const char *name, const char *mode)
 {
index 5f84565..b3b4b8b 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: wrbuf.c,v $
- * Revision 1.7  1999-11-03 09:05:56  adam
+ * Revision 1.8  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.7  1999/11/03 09:05:56  adam
  * Implemented wrbuf_puts.
  *
  * Revision 1.6  1999/10/28 11:36:40  adam
@@ -35,7 +38,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <wrbuf.h>
+#include <yaz/wrbuf.h>
 
 WRBUF wrbuf_alloc(void)
 {
index f138229..b5bccd2 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: xmalloc.c,v $
- * Revision 1.9  1999-09-10 08:58:32  adam
+ * Revision 1.10  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.9  1999/09/10 08:58:32  adam
  * Set TRACE_XMALLOC to 1.
  *
  * Revision 1.8  1999/08/27 09:40:32  adam
@@ -57,8 +60,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <log.h>
-#include <xmalloc.h>
+#include <yaz/log.h>
+#include <yaz/xmalloc.h>
 
 #define TRACE_XMALLOC 1
 
index a8a339b..ae965c9 100755 (executable)
@@ -8,7 +8,10 @@ exec tclsh "$0" "$@"
 # Sebastian Hammer, Adam Dickmeiss
 #
 # $Log: yc.tcl,v $
-# Revision 1.2  1999-06-09 09:43:11  adam
+# Revision 1.3  1999-11-30 13:47:12  adam
+# Improved installation. Moved header files to include/yaz.
+#
+# Revision 1.2  1999/06/09 09:43:11  adam
 # Added option -I and variable h-path to specify path for header files.
 #
 # Revision 1.1  1999/06/08 10:10:16  adam
@@ -907,7 +910,7 @@ proc asnImports {} {
            } else {
                set fname $val
            }
-           puts $file(outh) "\#include \"${fname}.h\""
+           puts $file(outh) "\#include <$inf(h-dir)${fname}.h>"
 
             if {[info exists inf(prefix,$val)]} {
                 set prefix $inf(prefix,$val)
@@ -1104,12 +1107,12 @@ proc asnModules {} {
            if {![info exists inf(h-file)]} {
                set inf(h-file) ${fname}.h
            }
-           set file(outh) [open $inf(h-path)/$inf(h-file) w]
+           set file(outh) [open $inf(h-path)/$inf(h-dir)$inf(h-file) w]
 
            if {![info exists inf(p-file)]} {
                set inf(p-file) ${fname}-p.h
            }
-           set file(outp) [open $inf(h-path)/$inf(p-file) w]
+           set file(outp) [open $inf(h-path)/$inf(h-dir)$inf(p-file) w]
 
            set md [clock format [clock seconds]]
            
@@ -1125,17 +1128,17 @@ proc asnModules {} {
            puts $file(outp) "/* Module-P: $inf(module) */"
            puts $file(outp) {}
 
-           puts $file(outc) "\#include \"$inf(p-file)\""
+           puts $file(outc) "\#include <$inf(h-dir)$inf(p-file)>"
 
            puts $file(outh) "\#ifndef ${ppname}_H"
            puts $file(outh) "\#define ${ppname}_H"
            puts $file(outh) {}
-           puts $file(outh) "\#include <odr.h>"
+           puts $file(outh) "\#include <$inf(h-dir)odr.h>"
            
            puts $file(outp) "\#ifndef ${ppname}_P_H"
            puts $file(outp) "\#define ${ppname}_P_H"
            puts $file(outp) {}
-           puts $file(outp) "\#include \"$inf(h-file)\""
+           puts $file(outp) "\#include <$inf(h-dir)$inf(h-file)>"
 
 
            puts $file(outp) "\#ifdef __cplusplus"
@@ -1304,6 +1307,7 @@ proc userDef {name} {
 set inf(verbose) 0
 set inf(prefix) {yc_ Yc_ YC_}
 set inf(h-path) .
+set inf(h-dir) ""
 
 # Parse command line
 set l [llength $argv]
@@ -1328,6 +1332,13 @@ while {$i < $l} {
              }
            set inf(h-path) $p
         }
+       -i* {
+           set p [string range $arg 2 end]
+           if {![string length $p]} {
+                 set p [lindex $argv [incr i]]
+            }
+           set inf(h-dir) [string trim $p \\/]/
+       }
         -h* {
            set p [string range $arg 2 end]
            if {![string length $p]} {
@@ -1379,7 +1390,7 @@ while {$i < $l} {
 }
 
 if {![info exists inf(iname)]} {
-    puts "YAZ ODR Compiler ${yc_version}"
+    puts "YAZ ASN.1 Compiler ${yc_version}"
     puts -nonewline "Usage: ${argv0}"
     puts { [-v] [-c cfile] [-h hfile] [-p hfile] [-d dfile] [-I path]}
     puts {    [-x prefix] [-m module] file}
index d86601f..f0d1cb7 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile.mak - makefile for MS NMAKE 
-# $Id: makefile,v 1.8 1999-07-21 08:48:02 adam Exp $
+# $Id: makefile,v 1.9 1999-11-30 13:47:12 adam Exp $
 #
 # Programmed by
 #  HL: Heikki Levanto, Index Data
@@ -73,10 +73,10 @@ TMP=$(TMPDIR)
 DLL=$(BINDIR)\Yaz.dll
 IMPLIB=$(LIBDIR)\Yaz.lib
 
-CLIENT=$(BINDIR)\client.exe
+CLIENT=$(BINDIR)\yaz-client.exe
 SERVER=$(LIBDIR)\server.lib
-ZTEST=$(BINDIR)\ztest.exe
-PROTOH=$(INCLDIR)\proto.h
+ZTEST=$(BINDIR)\yaz-ztest.exe
+PROTOH=$(INCLDIR)\yaz\proto.h
 
 # shortcut names defined here
 dll : $(DLL) 
@@ -154,8 +154,7 @@ ZTEST_LINK_OPTIONS = /subsystem:console
 # TCL
 TCL="C:\Program Files\Tcl\bin\tclsh80.exe"
 
-COMMON_TCL_OPTIONS= ..\util\yc.tcl -d z.tcl -I$(INCLDIR)
-
+COMMON_TCL_OPTIONS= ..\util\yc.tcl -d z.tcl -I$(INCLDIR) -i yaz
 
 # Final opt variables
 !if $(DEBUG)
@@ -347,11 +346,11 @@ ALL_OBJS= \
 ##########################################################
 
 !if $(NEW_Z3950)
-$(PROTOH): makefile $(INCLDIR)\z-proto.h
-       type $(INCLDIR)\z-proto.h > $(INCLDIR)\proto.h
+$(PROTOH): makefile $(INCLDIR)\yaz\z-proto.h
+       type $(INCLDIR)\yaz\z-proto.h > $(PROTOH)
 !else
-$(PROTOH): makefile $(INCLDIR)\prt-proto.h 
-       type $(INCLDIR)\prt-proto.h > $(INCLDIR)\proto.h
+$(PROTOH): makefile $(INCLDIR)\yaz\prt-proto.h 
+       type $(INCLDIR)\yaz\prt-proto.h > $(PROTOH)
 !endif
 
 
@@ -363,21 +362,21 @@ Z3950_C_DIR=$(Z3950DIR)
 #!!! Should be moved to OBJ, but that requires too much trickery
 
 # Files generated from datetime.asn
-DATETIME_H_FILES = $(INCLDIR)\z-date.h
+DATETIME_H_FILES = $(INCLDIR)\yaz\z-date.h
 DATETIME_C_FILES = $(Z3950_C_DIR)\z-date.c
 
 # Files generated from univres.asn
-UNIVRES_H_FILES = $(INCLDIR)\z-univ.h
+UNIVRES_H_FILES = $(INCLDIR)\yaz\z-univ.h
 UNIVRES_C_FILES = $(Z3950_C_DIR)\z-univ.c
 
 # Files generated from esupdate.asn
-ESUPDATE_H_FILES = $(INCLDIR)\zes-update.h
+ESUPDATE_H_FILES = $(INCLDIR)\yaz\zes-update.h
 ESUPDATE_C_FILES = $(Z3950_C_DIR)\zes-update.c
 
 # Files created from z3950v3.asn
 Z3950V3_H_FILES= \
-   $(INCLDIR)\z-accdes1.h \
-   $(INCLDIR)\z-core.h
+   $(INCLDIR)\yaz\z-accdes1.h \
+   $(INCLDIR)\yaz\z-core.h
 
 Z3950V3_C_FILES= \
    $(Z3950_C_DIR)\z-accdes1.c \
@@ -438,11 +437,11 @@ generated_files: \
 
 # Yaz client
 {$(CLIENTDIR)}.c{$(OBJDIR)}.obj:
-       @$(CPP) $(COPT) $<      /D"_CONSOLE"
+       @$(CPP) $(COPT) $< /D"_CONSOLE"
 
 # Ztest
 {$(ZTESTDIR)}.c{$(OBJDIR)}.obj:
-       @$(CPP) $(COPT) $< /D"_CONSOLE" /D"_MBCS"
+       @$(CPP) $(COPT) $< /D"_CONSOLE"
 
 # Server
 {$(SERVERDIR)}.c{$(OBJDIR)}.obj:
@@ -505,7 +504,7 @@ $(DLL) $(IMPLIB): "$(BINDIR)" $(DLL_OBJS)
                $(DLL_LINK_OPTIONS)
                $(DLL_OBJS) 
                /out:$(DLL) 
-               /implib:$(IMPLIB)
+               /implib:"$(LIBDIR)/yaz.lib"
                /pdb:"$(LIBDIR)/yaz.pdb" 
                /map:"$(LIBDIR)/yaz.map"  
 <<
@@ -517,8 +516,10 @@ $(CLIENT) : "$(BINDIR)" $(YAZ_CLIENT_OBJS)
                $(CLIENT_LINK_OPTIONS)
                $(LINK_LIBS) 
                $(IMPLIB)
-               $(YAZ_CLIENT_OBJS) 
-               /out:$(CLIENT) 
+               $(YAZ_CLIENT_OBJS)\r
+               /pdb:"$(LIBDIR)/yaz-client.pdb"\r
+               /map:"$(LIBDIR)/yaz-client.map"
+               /out:$(CLIENT)
 <<
 
 $(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(SERVER) $(DLL)
@@ -527,10 +528,13 @@ $(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(SERVER) $(DLL)
         $(LNKOPT) 
                $(ZTEST_LINK_OPTIONS)
                $(LINK_LIBS) 
-               shell32.lib 
+               shell32.lib
                $(IMPLIB)
                $(SERVER)
-               $(ZTEST_OBJS) 
+               $(ZTEST_OBJS) \r
+               /implib:"$(LIBDIR)/yaz-ztest.lib"\r
+               /pdb:"$(LIBDIR)/yaz-ztest.pdb"\r
+               /map:"$(LIBDIR)/yaz-ztest.map"
                /out:$(ZTEST) 
 <<
 
@@ -555,20 +559,21 @@ $(SERVER) : "$(BINDIR)" $(YAZ_SERVER_OBJS)
 
 ############## clean
 clean:
-       del $(OBJDIR)\*.obj
-       del $(OBJDIR)\*.sbr
        del $(DLL) 
        del $(CLIENT)
        del $(SERVER)
        del $(ZTEST)
-       del $(TMPDIR)\*.
+       del $(TMPDIR)\*.\r
+       del $(LIBDIR)\*.MAP\r
+       del $(LIBDIR)\*.LIB
+       del $(OBJDIR)\*.OBJ\r
        del $(PROTOH)
 
 realclean: clean
        del $(Z3950_C_DIR)\*.c
        del $(Z3950_C_DIR)\*.h
-       del $(INCLDIR)\z-accdes1.h
-       del $(INCLDIR)\z-core.h
+       del $(INCLDIR)\yaz\z-accdes1.h
+       del $(INCLDIR)\yaz\z-core.h
        del $(DATETIME_H_FILES)
        del $(UNIVRES_H_FILES)
        del $(ESUPDATE_H_FILES)
@@ -606,7 +611,10 @@ $(PROTOH): $(GENERATED_C_FILES) $(GENERATED_H_FILES)
 ###########################################################
 #
 # $Log: makefile,v $
-# Revision 1.8  1999-07-21 08:48:02  adam
+# Revision 1.9  1999-11-30 13:47:12  adam
+# Improved installation. Moved header files to include/yaz.
+#
+# Revision 1.8  1999/07/21 08:48:02  adam
 # Removed dmalloc.obj.
 #
 # Revision 1.7  1999/06/09 15:10:08  heikki
diff --git a/yaz.spec b/yaz.spec
new file mode 100644 (file)
index 0000000..7d4a5fb
--- /dev/null
+++ b/yaz.spec
@@ -0,0 +1,40 @@
+Summary: YAZ - A Z39.50 Library
+Name: yaz
+Version: 1.5
+Release: 1
+Copyright: GPL
+Group: Development/Libraries
+Vendor: Index Data ApS <info@indexdata.dk>
+Url: http://www.indexdata.dk/yaz/
+Source: yaz-1.5.tar.gz
+BuildRoot: /var/tmp/%{name}-%{version}-root
+Packager: Adam Dickmeiss <adam@indexdata.dk>
+
+%description
+The YAZ package is a developers' library for developing client - and
+server application using the ANSI/NISO Z39.50 protocol for Information
+Retrieval.
+
+%prep
+%setup
+
+%build
+
+CFLAGS="$RPM_OPT_FLAGS" \
+ ./configure --with-build-root=$RPM_BUILD_ROOT --prefix=/usr --enable-yc --enable-tcpd
+make CFLAGS="$RPM_OPT_FLAGS"
+
+%install
+rm -fr $RPM_BUILD_ROOT
+make install
+
+%files
+%defattr(-,root,root)
+%doc README LICENSE CHANGELOG TODO
+%config /usr/lib/yaz/tab
+/usr/bin/yaz-client
+/usr/bin/yaz-ztest
+/usr/bin/yaz-config
+/usr/lib/libyaz.a
+/usr/include/yaz
+%dir /usr/lib/yaz
index 870ab65..afb1eb4 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.3 1999-06-09 09:43:31 adam Exp $
+# $Id: Makefile.in,v 1.4 1999-11-30 13:47:12 adam Exp $
 
 SHELL=/bin/sh
 
@@ -43,16 +43,16 @@ $(LIB): $(PO)
        $(RANLIB) $(LIB)
 
 $(CF) ../include/z-accdes1.h: z.tcl z3950v3.asn ../util/yc.tcl
-       ../util/yc.tcl -d z.tcl -I ../include $(YCFLAGS) z3950v3.asn
+       ../util/yc.tcl -d z.tcl -i yaz -I ../include $(YCFLAGS) z3950v3.asn
 
 z-date.c ../include/z-date.h: z.tcl datetime.asn ../util/yc.tcl
-       ../util/yc.tcl -d z.tcl -I ../include $(YCFLAGS) datetime.asn
+       ../util/yc.tcl -d z.tcl -i yaz -I ../include $(YCFLAGS) datetime.asn
 
 z-univ.c ../include/z-univ.h: z.tcl univres.asn
-       ../util/yc.tcl -d z.tcl -I ../include $(YCFLAGS) univres.asn
+       ../util/yc.tcl -d z.tcl -i yaz -I ../include $(YCFLAGS) univres.asn
 
 zes-update.c ../include/zes-update.h: z.tcl esupdate.asn
-       ../util/yc.tcl -d z.tcl -I ../include $(YCFLAGS) esupdate.asn
+       ../util/yc.tcl -d z.tcl -i yaz -I ../include $(YCFLAGS) esupdate.asn
 
 .c.o:
        $(CC) -c $(CFLAGS) $(DEFS) $<
index 4d60c0a..69c6a4b 100644 (file)
@@ -1,7 +1,7 @@
 # Copyright (C) 1995-1999, Index Data
 # All rights reserved.
 # Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile.in,v 1.7 1999-06-09 09:43:31 adam Exp $
+# $Id: Makefile.in,v 1.8 1999-11-30 13:47:12 adam Exp $
 
 SHELL=/bin/sh
 
@@ -21,7 +21,7 @@ DEFS=$(INCLUDE) $(CDEFS)
 LIB=$(LIBDIR)/libserver.a 
 YAZLIBS=$(LIBDIR)/libserver.a $(LIBDIR)/libzutil.a $(LIBDIR)/libasn.a \
   $(LIBDIR)/libodr.a $(LIBDIR)/libcomstack.a $(LIBMOSI) $(LIBDIR)/libutil.a
-PROG=ztest
+PROG=yaz-ztest
 PROGO=ztest.o read-grs.o
 RANLIB=ranlib
 
index 3312ff4..2751046 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: read-grs.c,v $
- * Revision 1.4  1999-08-27 09:40:32  adam
+ * Revision 1.5  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.4  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.3  1999/03/31 11:18:25  adam
@@ -33,8 +36,8 @@
 #include <ctype.h>
 #include <stdlib.h>
 
-#include <proto.h>
-#include <log.h>
+#include <yaz/proto.h>
+#include <yaz/log.h>
 
 #define GRS_MAX_FIELDS 50
 
index 75eded2..6e88907 100644 (file)
@@ -7,7 +7,10 @@
  *    Chas Woodfield, Fretwell Downing Datasystems.
  *
  * $Log: ztest.c,v $
- * Revision 1.26  1999-08-27 09:40:32  adam
+ * Revision 1.27  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.26  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.25  1999/06/01 14:29:12  adam
 #include <ctype.h>
 #include <assert.h>
 
-#include <backend.h>
-#include <proto.h>
-#include <log.h>
+#include <yaz/backend.h>
+#include <yaz/log.h>
 
 Z_GenericRecord *read_grs1(FILE *f, ODR o);
 
index ce0b831..e7fb417 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: diagbib1.c,v $
- * Revision 1.1  1999-06-08 10:10:16  adam
+ * Revision 1.2  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.1  1999/06/08 10:10:16  adam
  * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
  *
  * Revision 1.7  1997/09/29 07:22:26  adam
@@ -32,7 +35,7 @@
 
 #include <stdio.h>
 
-#include "diagbib1.h"
+#include <yaz/diagbib1.h>
 
 static struct {
     int code;
index 0b1d5fa..b64dd4c 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: logrpn.c,v $
- * Revision 1.2  1999-08-27 09:40:33  adam
+ * Revision 1.3  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1999/08/27 09:40:33  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.1  1999/06/08 10:10:16  adam
@@ -51,8 +54,8 @@
 #include <stdio.h>
 #include <assert.h>
 
-#include <log.h>
-#include <logrpn.h>
+#include <yaz/log.h>
+#include <yaz/logrpn.h>
 
 static void attrStr (int type, int value, enum oid_value ast, char *str)
 {
index 7762515..e9fda01 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: otherinfo.c,v $
- * Revision 1.3  1999-11-10 09:06:40  adam
+ * Revision 1.4  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.3  1999/11/10 09:06:40  adam
  * Fixed yaz_oi_update so that it ignores NULL pointer.
  *
  * Revision 1.2  1999/09/13 12:51:35  adam
@@ -21,7 +24,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <otherinfo.h>
+#include <yaz/otherinfo.h>
 
 void yaz_oi_APDU(Z_APDU *apdu, Z_OtherInformation ***oip)
 {
index a302244..fa3d249 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: pquery.c,v $
- * Revision 1.1  1999-06-08 10:10:16  adam
+ * Revision 1.2  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.1  1999/06/08 10:10:16  adam
  * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
  *
  * Revision 1.22  1999/04/20 09:56:49  adam
 #include <string.h>
 #include <stdlib.h>
 
-#include <proto.h>
-#include <oid.h>
-
-#include <pquery.h>
+#include <yaz/proto.h>
+#include <yaz/oid.h>
+#include <yaz/pquery.h>
 
 static oid_value p_query_dfset = VAL_NONE;
 
index 0c30124..c79c7dc 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: prt-ext.c,v $
- * Revision 1.1  1999-06-08 10:10:16  adam
+ * Revision 1.2  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.1  1999/06/08 10:10:16  adam
  * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
  *
  * Revision 1.22  1999/05/26 15:24:26  adam
@@ -79,7 +82,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 /*
  * The table below should be moved to the ODR structure itself and
index f0de394..c5ba47a 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: yaz-ccl.c,v $
- * Revision 1.2  1999-06-16 12:00:08  adam
+ * Revision 1.3  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.2  1999/06/16 12:00:08  adam
  * Added proximity.
  *
  * Revision 1.1  1999/06/08 10:12:43  adam
@@ -36,7 +39,7 @@
 #include <string.h>
 #include <assert.h>
 
-#include <yaz-ccl.h>
+#include <yaz/yaz-ccl.h>
 
 static Z_RPNStructure *ccl_rpn_structure (ODR o, struct ccl_rpn_node *p);
 
index ddcd8d9..ba4de8f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: zget.c,v $
- * Revision 1.1  1999-06-08 10:10:16  adam
+ * Revision 1.2  1999-11-30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.1  1999/06/08 10:10:16  adam
  * New sub directory zutil. Moved YAZ Compiler to be part of YAZ tree.
  *
  * Revision 1.17  1999/04/20 09:56:48  adam
@@ -64,7 +67,7 @@
  *
  */
 
-#include <proto.h>
+#include <yaz/proto.h>
 
 Z_InitRequest *zget_InitRequest(ODR o)
 {