Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/yaz
authorDennis Schafroth <dennis@indexdata.com>
Tue, 26 Oct 2010 12:18:06 +0000 (14:18 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Tue, 26 Oct 2010 12:18:06 +0000 (14:18 +0200)
50 files changed:
.cproject
IDMETA
NEWS
configure.ac
debian/changelog
debian/libyaz4-dev.manpages
doc/Makefile.am
doc/bib1-attr-man.xml
doc/common
doc/gfs-options.xml
doc/gfs-synopsis.xml
doc/introduction.xml
doc/yaz-asncomp-man.xml
doc/yaz-client-commands.xml
doc/yaz-client-man.xml
doc/yaz-config-man.xml
doc/yaz-iconv-man.xml
doc/yaz-icu-man.xml
doc/yaz-illclient-man.xml
doc/yaz-json-parse-man.xml
doc/yaz-log-man.xml
doc/yaz-man.xml
doc/yaz-marcdump-man.xml
doc/yaz-ztest-man.xml
doc/yaz.xml
doc/zoom.xml
doc/zoomsh-man.xml
include/yaz/backend.h
include/yaz/rpn2cql.h
include/yaz/rpn2solr.h
src/oid.csv
src/options.c
src/seshigh.c
src/solr.c
src/statserv.c
src/tcpip.c
src/zoom-c.c
src/zoom-sru.c
src/zoom-z3950.c
util/yaz-icu.c
util/yaz-record-conv.c
win/makefile
win/yaz.nsi
win/yaz.win32.nsi [new file with mode: 0644]
win/yaz.win64.nsi [new file with mode: 0644]
yaz-config.in
yaz.spec.in
zoom/zoomsh.c
zoom/zoomtst3.c
ztest/ztest.c

index 2b699b9..864e93e 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -40,7 +40,7 @@
                                                                <option defaultValue="true" id="macosx.cpp.link.option.shared.2082905640" name="Shared (-dynamiclib)" superClass="macosx.cpp.link.option.shared" valueType="boolean"/>
                                                        </tool>
                                                        <tool id="cdt.managedbuild.tool.gnu.assembler.macosx.base.1871976203" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.macosx.base">
-                                                               <option id="gnu.both.asm.option.include.paths.998378482" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath"/>
+                                                               <option id="gnu.both.asm.option.include.paths.998378482" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
                                                                <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1256561366" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
                                                        </tool>
                                                        <tool id="cdt.managedbuild.tool.gnu.archiver.macosx.base.1171332498" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.macosx.base"/>
                                                <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="client"/>
                                                <entry excluding="*.o|*.lo" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="test"/>
                                                <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="zoom"/>
+                                               <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="ztest"/>
                                        </sourceEntries>
                                </configuration>
                        </storageModule>
diff --git a/IDMETA b/IDMETA
index 3459caa..423a6de 100644 (file)
--- a/IDMETA
+++ b/IDMETA
@@ -1,2 +1,2 @@
 DEBIAN_DIST="squeeze lenny"
-UBUNTU_DIST="lucid karmic"
+UBUNTU_DIST="maverick lucid karmic"
diff --git a/NEWS b/NEWS
index eb25879..fed8f3b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,22 @@
---- 4.0.13 2010/MM/DD
+tcp comstack: change behavior for @-specs (anyaddr). @ listens on
+AF_INET (IPV4) peers, and @6 listens to AF_INET6 (ipv6) peers.
+Previously @ listened on AF_INET6 which accepted both IPV4 and IPV6
+peers on some Linux systems. However, in general that does not work
+so YAZ can not rely on that to work. Debian changed behavior in this
+respect from Debian lenny to Debian squeeze (still testing as of Oct
+2010). Refer to:
+http://www.mail-archive.com/debian-devel@lists.debian.org/msg277726.html
+
+--- 4.1.1 2010/10/05
+
+Fix yaz-config output: echo_source not set correctly by configure.
+
+--- 4.1.0 2010/10/05
 
 SOLR WebService support for yaz-client and ZOOM.
 
+Define record syntax JSON. OID: 1.2.840.10003.5.1000.81.3 .
+
 --- 4.0.12 2010/08/17
 
 Z39.50 facet support. Facet specifications are passed for search in
index fca1e8f..8675960 100644 (file)
@@ -1,7 +1,7 @@
 dnl This file is part of the YAZ toolkit.
 dnl Copyright (C) 1995-2010 Index Data
 AC_PREREQ([2.60])
-AC_INIT([yaz],[4.0.13],[yaz-help@indexdata.dk])
+AC_INIT([yaz],[4.1.1],[yaz-help@indexdata.dk])
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_AUX_DIR([config])
 AM_INIT_AUTOMAKE([1.9])
@@ -387,12 +387,6 @@ elif test "$enable_memdebug" = "no"; then
     AC_DEFINE([TRACE_XMALLOC],[0])
 fi
 dnl
-dnl ------ Using this for "in-source" yaz-config
-AC_SUBST([YAZ_SRC_ROOT])
-AC_SUBST([YAZ_BUILD_ROOT])
-YAZ_SRC_ROOT=`cd ${srcdir}; pwd`
-YAZ_BUILD_ROOT=`pwd`
-dnl
 dnl ------ versioning
 dnl
 WIN_FILEVERSION=`echo $PACKAGE_VERSION | $AWK 'BEGIN { FS = "."; } { m = $4; printf("%d,%d,%d,%d", $1, $2, $3 == "" ? "0" : $3, $4 == "" ? "1" : $4);}'`
@@ -430,7 +424,7 @@ Doxyfile
 win/version.nsi
 include/yaz/yaz-version.h
 ],[
-       sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz-config > util/yaz-config && chmod +x yaz-config util/yaz-config
+       sed s%echo_source=yes%echo_source=no%g < yaz-config > util/yaz-config && chmod +x yaz-config util/yaz-config
     ]
 )
 
index ec61805..d959eff 100644 (file)
@@ -1,3 +1,15 @@
+yaz (4.1.1-1indexdata) unstable; urgency=low
+
+  * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Tue, 05 Oct 2010 15:00:39 +0200
+
+yaz (4.1.0-1indexdata) unstable; urgency=low
+
+  * Upstream.
+
+ -- Adam Dickmeiss <adam@indexdata.dk>  Tue, 05 Oct 2010 10:09:48 +0200
+
 yaz (4.0.13-1indexdata) unstable; urgency=low
 
   * Upstream.
index 174644c..5c7701f 100644 (file)
@@ -1,3 +1,3 @@
 debian/tmp/usr/share/man/man1/yaz-asncomp.1
 debian/tmp/usr/share/man/man7/yaz.7
-debian/tmp/usr/share/man/man8/yaz-config.8
+debian/tmp/usr/share/man/man1/yaz-config.1
index 0355eb3..d1e5836 100644 (file)
@@ -13,7 +13,7 @@ XMLFILES=bookinfo.xml introduction.xml installation.xml \
 HTMLFILES = index.html
 
 MANFILES=yaz-client.1 yaz-ztest.8 \
-       yaz-config.8 yaz.7 zoomsh.1 yaz-asncomp.1 \
+       yaz-config.1 yaz.7 zoomsh.1 yaz-asncomp.1 \
        yaz-marcdump.1 yaz-iconv.1 yaz-log.7 \
        yaz-illclient.1 yaz-icu.1 bib1-attr.7 \
        yaz-json-parse.1
@@ -40,7 +40,7 @@ yaz-client.1: $(srcdir)/yaz-client-man.xml $(srcdir)/yaz-client-commands.xml
 yaz-ztest.8: yaz-ztest-man.xml gfs-options.xml gfs-synopsis.xml gfs-virtual.xml
        $(MAN_COMPILE) $(srcdir)/yaz-ztest-man.xml
 
-yaz-config.8: yaz-config-man.xml
+yaz-config.1: yaz-config-man.xml
        $(MAN_COMPILE) $(srcdir)/yaz-config-man.xml
 
 yaz.7: yaz-man.xml
index cd7f961..cdbfe53 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>Bib-1 Attribute Set</refentrytitle>
   <manvolnum>7</manvolnum>
+  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index ca4e4fa..00de5ca 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ca4e4fa028634b4e07f011eb6375e205ae96c709
+Subproject commit 00de5ca16beac9c3ac135ff92ff719b86b0c6df9
index 9af6f0e..c3ed444 100644 (file)
    </para></listitem>
  </varlistentry>
 
+ <varlistentry><term><literal>-K</literal></term>
+  <listitem><para>
+    Forces no-keepalive for HTTP sessions. By default GFS will keep
+    sessions alive for HTTP 1.1 sessions (as defined by the standard).
+    Using this option will force GFS to close the connection for each
+    operation.
+   </para></listitem>
+ </varlistentry>
+
  <varlistentry><term><literal>-r </literal>
    <replaceable>size</replaceable></term>
   <listitem><para>
index 81266c6..babc5e3 100644 (file)
@@ -17,6 +17,7 @@
  <arg choice="opt"><option>-C <replaceable>fname</replaceable></option></arg>
  <arg choice="opt"><option>-t <replaceable>minutes</replaceable></option></arg>
  <arg choice="opt"><option>-k <replaceable>kilobytes</replaceable></option></arg>
+ <arg choice="opt"><option>-K</option></arg>
  <arg choice="opt"><option>-d <replaceable>daemon</replaceable></option></arg>
  <arg choice="opt"><option>-w <replaceable>dir</replaceable></option></arg>
  <arg choice="opt"><option>-p <replaceable>pidfile</replaceable></option></arg>
index 1010413..fc9a628 100644 (file)
@@ -2,7 +2,7 @@
 
   <para>
    &yaz; is a C/C++ library for information retrieval applications
-   using the Z39.50/SRU protocols for information retrieval.
+   using the Z39.50/SRU/SOLR protocols for information retrieval.
   </para>
   
   <para>
@@ -16,7 +16,7 @@
     <listitem><para>
       Supports 
       <ulink url="&url.sru;">SRU GET/POST/SOAP</ulink>
-      version 1.1 (over HTTP and HTTPS).
+      version 1.2 (over HTTP and HTTPS).
      </para></listitem>
     <listitem><para>
       Includes BER encoders/decoders for the 
       protocol.
      </para></listitem>
     <listitem><para>
+      Supports 
+      <ulink url="&url.solr;">SOLR</ulink> Web Service version 1.4.x (client side only)
+     </para></listitem>
+    <listitem><para>
       Supports the following transports: BER over TCP/IP
       (<ulink url="&url.ber.over.tcpip;">RFC1729</ulink>),
       BER over unix local socket, and 
@@ -38,8 +42,8 @@
      </para></listitem>
     <listitem><para>
       Offers 
-      <ulink url="&url.zoom;">ZOOM</ulink> C API implementing both
-      Z39.50 and SRU.
+      <ulink url="&url.zoom;">ZOOM</ulink> C API implementing
+      Z39.50, SRU and SOLR Web Service.
      </para></listitem>
     <listitem><para>
       The &yaz; library offers a set of useful utilities
index 77fed0c..1df0fd8 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-asncomp</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 09f7dfc..769aa60 100644 (file)
    <literal>sru</literal> <replaceable>method</replaceable> <replaceable>version</replaceable>
   </term>
   <listitem>
-   <para>Selects SRU method and version.
+   <para>Selects Web Service method and version.
     Must be one of <literal>POST</literal>,
-    <literal>GET</literal>, <literal>SOAP</literal> (default). Version
-    should be either 1.1 or 1.2. Other versions are allowed - for testing
-    purposes (version negotiation with SRU server).
+    <literal>GET</literal>, <literal>SOAP</literal> (default)
+    or <literal>SOLR</literal>. Version
+    should be either 1.1 or 1.2 for SRU. Other versions are allowed - for testing
+    purposes (version negotiation with SRU server). 
+    The version is currently not used for SOLR Web Services
    </para>
   </listitem>
  </varlistentry>
     See the
     <ulink
      url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
-     Z39.50 standard
+     Z39.50 standard on set bounds
     </ulink>
     for more details.
    </para>
     See the
     <ulink
      url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
-     Z39.50 standard
+     Z39.50 standard on set bounds
     </ulink> for more details.
    </para>
   </listitem>
     See the
     <ulink
      url="http://www.loc.gov/z3950/agency/markup/04.html#3.2.2.1.6">
-     Z39.50 standard
+     Z39.50 standard on set bounds
     </ulink>
     for more details.
    </para>
     are registered. See
     <ulink
      url="http://www.loc.gov/z3950/agency/defns/oids.html#5">
-     Z39.50 Standard
+     Z39.50 Record Syntax Identifiers
     </ulink>
     for more details. Commonly used records syntaxes include usmarc,
-    sutrs, grs1 and xml.
+    sutrs and xml.
    </para>
   </listitem>
  </varlistentry>
index 3325fa5..0ea2c6b 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-client</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
   
  <refsect1><title>DESCRIPTION</title>
   <para>
-   <command>yaz-client</command> is a Z39.50/SRU client (origin) with a
-   simple command line interface that allows you to test behavior and
-   performance of Z39.50 targets and SRU servers.
+   <command>yaz-client</command> is a
+   <ulink url="&url.z39.50;">Z39.50</ulink>/<ulink url="&url.sru;">SRU</ulink>
+   client (origin) with a simple command line interface that allows
+   you to test behavior and performance of Z39.50 targets and SRU servers.
+  </para>
+  <para>
+   From YAZ version 4.1.0 <command>yaz-client</command> may also operate as a
+   <ulink url="&url.solr;">SOLR</ulink> Web Service
+   client.
   </para>
   <para>
    If the <replaceable>server-addr</replaceable> is specified, the client creates
index 5170b15..2dddb31 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [ 
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-config</refentrytitle>
-  <manvolnum>8</manvolnum>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index d24dff7..e86c367 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-iconv</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 10a5d29..5248b73 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-icu</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 43c489c..631594b 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-illclient</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 20af868..ca2bd21 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-json-parse</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 1510977..2aaec9c 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [ 
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-log</refentrytitle>
   <manvolnum>7</manvolnum>
+  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index e96df6a..378186e 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz</refentrytitle>
   <manvolnum>7</manvolnum>
+  <refmiscinfo class="manual">Conventions and miscellaneous</refmiscinfo>
  </refmeta>
  
  <refnamediv>
@@ -29,8 +31,8 @@
    YAZ is a C/C++ programmer's toolkit supporting the development
    of Z39.50v3 clients and servers. The YAZ toolkit offers
    several different levels of access to the ISO23950/Z39.50, SRU
-   and ILL protocols. The level that you need to use depends
-   on your requirements, and the role (server of client) that you want
+   SOLR (client only) and ILL protocols. The level that you need to use depends
+   on your requirements, and the role (server or client) that you want
    to implement.
   </para>
  </refsect1>
index dbc4060..eb9710e 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
+
  <refmeta>
   <refentrytitle>yaz-marcdump</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index 14f743c..566c938 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>yaz-ztest</refentrytitle>
   <manvolnum>8</manvolnum>
+  <refmiscinfo class="manual">System management commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
   <refname>yaz-ztest</refname>
-  <refpurpose>Z39.50 Test Server</refpurpose>
+  <refpurpose>Z39.50/SRU Test Server</refpurpose>
  </refnamediv>
  
  <refsynopsisdiv>
@@ -32,9 +34,9 @@
  </refsynopsisdiv>
  <refsect1><title>DESCRIPTION</title>
   <para>
-   <command>yaz-ztest</command> is a Z39.50 test server that uses
-   the YAZ generic frontend server API.
-   The server acts as a real Z39.50 server but does not use a database.
+   <command>yaz-ztest</command> is a Z39.50/SRU test server that uses
+   the YAZ generic frontend server (GFS) API.
+   The server acts as a real Z39.50/SRU server but does not use a database.
    It returns a random hit count and returns a subset of a few built-in
    records.
   </para>
index 3e0880c..7d51b20 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" standalone="no"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1//EN"
-    "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" 
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" 
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
index 3698ccf..da8f0a9 100644 (file)
@@ -29,22 +29,25 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
    programming language or toolkit.
   </para>
 
-  <note>
-   <para>
-    A recent addition to &yaz; is SRU support. You can now make
-    SRU ZOOM connections by specifying scheme <literal>http://</literal>
-    for the hostname for a connection.  The dialect of SRU used is
-    specified by the value of the connection's <literal>sru</literal>
-    option, which may be SRU over HTTP GET (<literal>get</literal>),
-    SRU over HTTP POST (<literal>post</literal>) or SRW (SRU over
-    SOAP) (<literal>soap</literal>).  Using the facility for embedding
-    options in target strings, a connection can be forced to use SRU
-    rather the SRW (the default) by prefixing the target string with
-    <literal>sru=get,</literal>, like this:
+  <para>
+    From YAZ version 2.1.12, <ulink url="&url.sru;">SRU</ulink> is supported.
+    You can make SRU ZOOM connections by specifying scheme
+    <literal>http://</literal> for the hostname for a connection.
+    The dialect of SRU used is specified by the value of the
+    connection's <literal>sru</literal> option, which may be SRU over
+    HTTP GET (<literal>get</literal>),
+    SRU over HTTP POST (<literal>post</literal>), (SRU over
+    SOAP) (<literal>soap</literal>) or <literal>SOLR</literal>
+    (<ulink url="&url.solr;">SOLR</ulink> Web Service).
+    Using the facility for embedding options in target strings, a
+    connection can be forced to use SRU rather the SRW (the default) by
+    prefixing the target string with <literal>sru=get,</literal>, like this:
     <literal>sru=get,http://sru.miketaylor.org.uk:80/sru.pl</literal>
-   </para>
-  </note>
-
+  </para>
+  <para>
+    <ulink url="&url.solr;">SOLR</ulink>  protocol support was added to YAZ in version 4.1.0, 
+    as a dialect of a SRU protocol, since both are HTTP based protocols. 
+  </para>
   <para>
    The lack of a simple Z39.50 client API for &yaz; has become more
    and more apparent over time. So when the first &zoom; specification
@@ -115,7 +118,8 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
    <para>
     You can prefix the host with a scheme followed by colon. The
     default scheme is <literal>tcp</literal> (Z39.50 protocol).
-    The scheme <literal>http</literal> selects SRU over HTTP.
+    The scheme <literal>http</literal> selects SRU/get over HTTP by default, 
+    but can overridded to use SRU/post, SRW and the SOLR protocol. 
    </para>
    <para>
     You can prefix the scheme-qualified host-string with one or more
@@ -274,11 +278,12 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
        discover whether the server claims to support the specified
        operations.
        </entry><entry>none</entry></row>
-      <row><entry>
-        sru</entry><entry>
-       SRU transport type. Must be either <literal>soap</literal>,
-       <literal>get</literal> or <literal>post</literal>.
-       </entry><entry>soap</entry></row>
+      <row>
+       <entry>sru</entry><entry>
+       SRU/SOLR transport type. Must be either <literal>soap</literal>,
+       <literal>get</literal>, <literal>post</literal>, or
+       <literal>solr</literal>.
+        </entry><entry>soap</entry></row>
       <row><entry>
         sru_version</entry><entry>
        SRU/SRW version. Should be <literal>1.1</literal>, or
@@ -289,9 +294,11 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
        </entry><entry>1.2</entry></row>
       <row><entry>
         facets</entry><entry>
-       A FacetList is comma-separated list of facet, which is defined as <literal>AttributeList</literal> 
-       and a optional FacetTerm (a Term and a frequency). On request the terms is missing. 
-       On response the the list contains the terms that the target could collect. 
+       A FacetList is comma-separated list of facet, which is defined
+       as <literal>AttributeList</literal>  and a optional FacetTerm
+       (a Term and a frequency). On request the terms is missing. 
+       On response the the list contains the terms that the target
+       could collect. 
        </entry><entry>none</entry></row>
      </tbody>
     </tgroup>
@@ -359,14 +366,14 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
     </para>
     </sect2>
    <sect2 id="zoom.sru.init.behavior">
-    <title>SRU Protocol behavior</title>
+    <title>SRU/SOLR Protocol behavior</title>
     <para>
-     The SRU protocol doesn't feature an Inititialize Request, so
+     The HTTP based protocols (SRU, SRW, SOLR) doesn't feature an Inititialize Request, so
      the connection phase merely establishes a TCP/IP connection
      with the SOAP service.
     </para>
     <para>Most of the ZOOM connection options do not
-     affect SRU and they are ignored. However, future versions
+     affect SRU/SOLR and they are ignored. However, future versions
      of &yaz; might honor <literal>implementationName</literal> and
      put that as part of User-Agent header for HTTP requests.
      </para>
@@ -664,7 +671,10 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
      SRU SearchRetrieveRequest.
     </para>
     <para>
-     Unfortunately, SRU does not define a database setting. Hence,
+     SOLR queries has to be done in SOLR query format.
+    </para>
+    <para>
+     Unfortunately, SRU or SOLR does not define a database setting. Hence,
      <literal>databaseName</literal> is unsupported and ignored.
      However, the path part in host parameter for functions 
      <function>ZOOM_connecton_new</function> and
@@ -806,7 +816,7 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
      </varlistentry>
      <varlistentry><term><literal>xml</literal></term>
       <listitem><para>The record is returned in XML if possible.
-       SRU and Z39.50 records with transfer syntax XML are
+       SRU, SOLR and Z39.50 records with transfer syntax XML are
        returned verbatim. MARC records are returned in
        <ulink url="&url.marcxml;">
         MARCXML
@@ -873,14 +883,68 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
     </para>
    </sect2>
    <sect2 id="zoom.sru.record.behavior">
-    <title>SRU Protocol behavior</title>
+    <title>SRU/SOLR Protocol behavior</title>
     <para>
-     The ZOOM driver for SRU treats records returned by a SRU server
+     The ZOOM driver for SRU/SOLR treats records returned by a SRU/SOLR server
      as if they where Z39.50 records with transfer syntax XML and
      no element set name or database name.
     </para>
    </sect2>
   </sect1>
+  <sect1 id="zoom.facets"><title>Facets</title>
+   <para>
+    Facets operations is not part of the official ZOOM specification, but is an Index Data extension 
+    for YAZ-based Z39.50 targets or <ulink url="&url.solr;">SOLR</ulink> targets. 
+    In case the target can and is requested to return facets, using a result set the ZOOM client 
+    can request one or all facet fields. Using a facet field the client can request the term count and 
+    then interate over the terms.
+   </para>
+   <synopsis>
+    ZOOM_facet_field *ZOOM_resultset_facets(ZOOM_resultset r);
+    const char ** ZOOM_resultset_facets_names(ZOOM_resultset r);
+    ZOOM_facet_field ZOOM_resultset_get_facet_field(ZOOM_resultset r, const char *facet_name);
+    ZOOM_facet_field ZOOM_resultset_get_facet_field_by_index(ZOOM_resultset r, int pos);
+    size_t ZOOM_resultset_facets_size(ZOOM_resultset r);
+
+    const char *ZOOM_facet_field_name(ZOOM_facet_field facet_field);
+    size_t ZOOM_facet_field_term_count(ZOOM_facet_field facet_field);
+    const char *ZOOM_facet_field_get_term(ZOOM_facet_field facet_field, size_t idx, int *freq);
+   </synopsis>
+   <para>
+    References to temporary structures are returned by all functions. They are only valid as long the Result set is valid.  
+    <function>ZOOM_resultset_get_facet_field</function> or
+    <function>ZOOM_resultset_get_facet_field_by_index</function>.
+    <function>ZOOM_resultset_facets</function>.
+    <function>ZOOM_resultset_facets_names</function>.
+    <function>ZOOM_facet_field_name</function>.
+    <function>ZOOM_facet_field_get_term</function>.
+    </para>
+   <para id="zoom.resultset.get_facet_field">
+    A single Facet field  is returned by function
+    <function>ZOOM_resultset_get_facet_field</function> or <function>ZOOM_resultset_get_facet_field_by_index</function> that takes a 
+    result set and facet name or positive index respectively. First facet has position zero.
+    If no facet could be obtained (invalid name or index out of bounds) <literal>NULL</literal> is returned.
+   </para>
+   <para id="zoom.resultset.facets">
+    An array of facets field can be returned by <function>ZOOM_resultset_facets</function>. The length of the array is 
+    given by <function>ZOOM_resultset_facets_size</function>. The array is zero-based and last entry will be at 
+    <function>ZOOM_resultset_facets_size(result_set)</function>-1. 
+   </para>
+   <para id="zoom.resultset.facets_names">
+    It is possible to interate over facets by name, by calling <function>ZOOM_resultset_facets_names</function>. 
+    This will return an const array of char * where each string can be used as parameter for 
+    <function>ZOOM_resultset_get_facet_field</function>. 
+   </para>
+   <para>
+   Function <function>ZOOM_facet_field_name</function> gets the request facet name from a returned facet field. 
+   </para>
+   <para>
+   Function <function>ZOOM_facet_field_get_term</function> returns the idx'th term and term count for a facet field. 
+   Idx must between 0 and <function>ZOOM_facet_field_term_count</function>-1, otherwise the returned reference will be 
+   <literal>NULL</literal>. On a valid idx, the value of the freq reference will be the term count. 
+   The *freq parameter must be valid pointer to integer.   
+   </para>
+   </sect1>
   <sect1 id="zoom.scan"><title>Scan</title>
    <para>
     This section describes an interface for Scan. Scan is not an
@@ -890,7 +954,7 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn)
    </para>
 
    <para>
-    The Scan interface is supported for both Z39.50 and SRU.
+    The Scan interface is supported for both Z39.50, SRU (and SOLR?).
    </para>
 
    <synopsis>
index e0bdf7e..1471d54 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
- "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [
      <!ENTITY % local SYSTEM "local.ent">
      %local;
  <refentryinfo>
   <productname>YAZ</productname>
   <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
  </refentryinfo>
  
  <refmeta>
   <refentrytitle>zoomsh</refentrytitle>
   <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
  
  <refnamediv>
index c781fa3..5c04a60 100644 (file)
@@ -358,6 +358,7 @@ typedef struct statserv_options_block
     int background;                 /**< auto daemon */
     char cert_fname[128];           /**< SSL certificate fname */
     char xml_config[128];           /**< XML config filename */
+    int keepalive;                  /**< keep alive if HTTP 1.1 (default: 1) */
 } statserv_options_block;
 
 YAZ_EXPORT int statserv_main(
index 09d83ba..68c4eec 100644 (file)
@@ -70,6 +70,7 @@ int cql_transform_rpn2cql_wrbuf(cql_transform_t ct,
     \param attributes RPN attributes
     \returns pattern value or NULL if not found
  */
+YAZ_EXPORT
 const char *cql_lookup_reverse(cql_transform_t ct, 
                                const char *category,
                                Z_AttributeList *attributes);
index f4dced9..7d05ea0 100644 (file)
@@ -70,6 +70,7 @@ int solr_transform_rpn2solr_wrbuf(solr_transform_t ct,
     \param attributes RPN attributes
     \returns pattern value or NULL if not found
  */
+YAZ_EXPORT
 const char *solr_lookup_reverse(solr_transform_t ct,
                                const char *category,
                                Z_AttributeList *attributes);
index 6b26b47..ebef64b 100644 (file)
@@ -78,6 +78,7 @@ RECSYN, Z3950_PREFIX.5.110.1, "tiff-b"
 RECSYN, Z3950_PREFIX.5.110.2, "wav"
 RECSYN, Z3950_PREFIX.5.111, "SQL-RS"
 RECSYN, Z3950_PREFIX.5.1000.81.2, "SOIF"
+RECSYN, Z3950_PREFIX.5.1000.81.3, "JSON"
 RECSYN, Z3950_PREFIX.5.109.10, "XML"
 RECSYN, Z3950_PREFIX.5.109.10, "text-XML"
 RECSYN, Z3950_PREFIX.5.109.11, "application-XML"
index 70d6219..7f6374c 100644 (file)
@@ -24,14 +24,14 @@ int options (const char *desc, char **argv, int argc, char **arg)
     int ch = 0;
     
     if (arg_no >= argc)
-        return -2;
+        return YAZ_OPTIONS_EOF;
     if (arg_off == 0)
     {
         while (argv[arg_no][0] == '\0')
         {
             arg_no++;
             if (arg_no >= argc)
-                return -2;
+                return YAZ_OPTIONS_EOF;
         }
         if (argv[arg_no][0] != '-' || argv[arg_no][1] == '\0')
         {
@@ -102,7 +102,7 @@ int options (const char *desc, char **argv, int argc, char **arg)
     *arg = argv[arg_no]+arg_off-1;
     arg_no = arg_no + 1;
     arg_off = 0;
-    return -1;
+    return YAZ_OPTIONS_ERROR;
 }
 /*
  * Local variables:
index 48e0a4b..378b130 100644 (file)
@@ -1907,7 +1907,7 @@ static void process_http_request(association *assoc, request *req)
             keepalive = 1;
         hres->version = "1.1";
     }
-    if (!keepalive)
+    if (!keepalive || !assoc->last_control->keepalive)
     {
         z_HTTP_header_add(o, &hres->headers, "Connection", "close");
         assoc->state = ASSOC_DEAD;
index c91cea8..9b77eee 100644 (file)
 
 #include "sru-p.h"
 
+#define SOLR_MAX_PARAMETERS  100
+
 #if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
-#define SOLR_MAX_PARAMETERS  100
-
 const char *xml_node_attribute_value_get(xmlNodePtr ptr, const char *node_name, const char *attribute_name) {
 
     struct _xmlAttr *attr;
@@ -127,7 +127,7 @@ static Z_AttributeList *yaz_solr_use_atttribute_create(ODR o, const char *name)
     elements = (Z_AttributeElement**) odr_malloc (o, attributes->num_attributes * sizeof(*elements));
     elements[0] = (Z_AttributeElement*)odr_malloc(o,sizeof(**elements));
     elements[0]->attributeType = odr_malloc(o, sizeof(*elements[0]->attributeType));
-    *elements[0]->attributeType = 1;
+   *elements[0]->attributeType = 1;
     elements[0]->attributeSet = odr_nullval();
     elements[0]->which = Z_AttributeValue_complex;
     elements[0]->value.complex = (Z_ComplexAttribute *) odr_malloc(o, sizeof(Z_ComplexAttribute));
index 8598891..d340a17 100644 (file)
@@ -42,8 +42,6 @@
 
 #if YAZ_POSIX_THREADS
 #include <pthread.h>
-#elif YAZ_GNU_THREADS
-#include <pth.h>
 #endif
 
 #include <fcntl.h>
@@ -119,7 +117,8 @@ statserv_options_block control_block = {
     "",                         /* PID fname */
     0,                          /* background daemon */
     "",                         /* SSL certificate filename */
-    ""                          /* XML config filename */
+    "",                         /* XML config filename */
+    1                           /* keepalive */
 };
 
 static int max_sessions = 0;
@@ -947,18 +946,6 @@ static void listener(IOCHAN h, int event)
             pthread_t child_thread;
             pthread_create(&child_thread, 0, new_session, new_line);
             pthread_detach(child_thread);
-#elif YAZ_GNU_THREADS
-            pth_attr_t attr;
-            pth_t child_thread;
-
-            attr = pth_attr_new();
-            pth_attr_set(attr, PTH_ATTR_JOINABLE, FALSE);
-            pth_attr_set(attr, PTH_ATTR_STACK_SIZE, 32*1024);
-            pth_attr_set(attr, PTH_ATTR_NAME, "session");
-            yaz_log(YLOG_DEBUG, "pth_spawn begin");
-            child_thread = pth_spawn(attr, new_session, new_line);
-            yaz_log(YLOG_DEBUG, "pth_spawn finish");
-            pth_attr_destroy(attr);
 #else
             new_session(new_line);
 #endif
@@ -1273,7 +1260,7 @@ int check_options(int argc, char **argv)
 
     get_logbits(1); 
 
-    while ((ret = options("1a:iszSTl:v:u:c:w:t:k:d:A:p:DC:f:m:r:",
+    while ((ret = options("1a:iszSTl:v:u:c:w:t:k:Kd:A:p:DC:f:m:r:",
                           argv, argc, &arg)) != -2)
     {
         switch (ret)
@@ -1300,9 +1287,6 @@ int check_options(int argc, char **argv)
 #if YAZ_POSIX_THREADS
             control_block.dynamic = 0;
             control_block.threads = 1;
-#elif YAZ_GNU_THREADS
-            control_block.dynamic = 0;
-            control_block.threads = 1;
 #else
             fprintf(stderr, "%s: Threaded mode not available.\n", me);
             return 1;
@@ -1354,6 +1338,9 @@ int check_options(int argc, char **argv)
             }
             control_block.maxrecordsize = r * 1024;
             break;
+        case 'K':
+            control_block.keepalive = 0;
+            break;
         case 'i':
             control_block.inetd = 1;
             break;
index d72bc44..dc1d127 100644 (file)
@@ -363,6 +363,13 @@ struct addrinfo *tcpip_getaddrinfo(const char *str, const char *port)
     if (!strcmp("@", host))
     {
         hints.ai_flags = AI_PASSIVE;
+        hints.ai_family = AF_INET;
+        error = getaddrinfo(0, port, &hints, &res);
+    }
+    else if (!strcmp("@6", host))
+    {
+        hints.ai_flags = AI_PASSIVE;
+        hints.ai_family = AF_INET6;
         error = getaddrinfo(0, port, &hints, &res);
     }
     else
@@ -434,25 +441,11 @@ void *tcpip_straddr(COMSTACK h, const char *str)
     if (sp->ai && h->state == CS_ST_UNBND)
     {
         int s = -1;
-        /* try to make IPV6 socket first */
         for (ai = sp->ai; ai; ai = ai->ai_next)
         {
-            if (ai->ai_family == AF_INET6)
-            {
-                s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-                if (s != -1)
-                    break;
-            }
-        }
-        if (s == -1)
-        {
-            /* no IPV6 could be made.. Try them all */
-            for (ai = sp->ai; ai; ai = ai->ai_next)
-            {
-                s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-                if (s != -1)
-                    break;
-            }
+            s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+            if (s != -1)
+                break;
         }
         if (s == -1)
             return 0;
index 70769e0..d557015 100644 (file)
@@ -178,7 +178,6 @@ ZOOM_task ZOOM_connection_insert_task(ZOOM_connection c, int which)
 
     task->running = 0;
     task->which = which;
-    clear_error(c);
     return task;
 }
 
index 0dc2745..c6d11e7 100644 (file)
@@ -261,8 +261,9 @@ static zoom_ret handle_srw_response(ZOOM_connection c,
         syntax = c->tasks->u.search.syntax;
         elementSetName = c->tasks->u.search.elementSetName;        
 
-        if (!c->tasks->u.search.recv_search_fired)
-        {
+        /* Required not for reporting client hit count multiple times into session */
+        if (!c->tasks->u.search.recv_search_fired) {
+            yaz_log(YLOG_DEBUG, "posting ZOOM_EVENT_RECV_SEARCH");
             event = ZOOM_Event_create(ZOOM_EVENT_RECV_SEARCH);
             ZOOM_connection_put_event(c, event);
             c->tasks->u.search.recv_search_fired = 1;
@@ -391,6 +392,7 @@ static void handle_srw_scan_response(ZOOM_connection c,
 int ZOOM_handle_sru(ZOOM_connection c, Z_HTTP_Response *hres,
                     zoom_ret *cret)
 {
+#if YAZ_HAVE_XML2
     int ret = 0;
     const char *addinfo = 0;
 
@@ -445,6 +447,9 @@ int ZOOM_handle_sru(ZOOM_connection c, Z_HTTP_Response *hres,
             ret = -1;
     }   
     return ret;
+#else
+    return -1;
+#endif
 }
 
 /*
index 5fc7c25..d13b336 100644 (file)
@@ -663,10 +663,10 @@ zoom_ret ZOOM_connection_Z3950_send_search(ZOOM_connection c)
         if (facet_list) {
             Z_OtherInformation **oi;
             yaz_oi_APDU(apdu, &oi);
-            if (facet_list) {
-                yaz_oi_set_facetlist(oi, c->odr_out, facet_list);
-            }
+            yaz_oi_set_facetlist(oi, c->odr_out, facet_list);
         }
+        else
+            yaz_log(YLOG_WARN, "Unable to parse facets: %s", facets);
     }
 
     assert(r);
index 2e99037..a8c43ce 100644 (file)
@@ -161,25 +161,25 @@ static void print_icu_converters(const struct config_t *p_config)
 
 static void print_icu_transliterators(const struct config_t *p_config)
 {
-    int32_t buf_cap = 128;
-    char buf[128];
-    int32_t i;
-    int32_t count = utrans_countAvailableIDs();
-    
+    UErrorCode status;
+    UEnumeration *en = utrans_openIDs(&status);
+    int32_t count = uenum_count(en, &status);
+    const char *name;
+    int32_t length;
+
     if (p_config->xmloutput)
         fprintf(config.outfile, "<transliterators count=\"%d\">\n",  count);
     else 
         fprintf(config.outfile, "Available ICU transliterators: %d\n", count);
-    
-    for(i = 0; i <count; i++)
+
+    while ((name = uenum_next(en, &length, &status)))
     {
-        utrans_getAvailableID(i, buf, buf_cap);
         if (p_config->xmloutput)
-            fprintf(config.outfile, "<transliterator id=\"%s\"/>\n", buf);
+            fprintf(config.outfile, "<transliterator id=\"%s\"/>\n", name);
         else
-            fprintf(config.outfile, " %s", buf);
+            fprintf(config.outfile, " %s", name);
     }
-    
+    uenum_close(en);
     if (p_config->xmloutput)
     {
         fprintf(config.outfile, "</transliterators>\n");
@@ -560,7 +560,7 @@ int main(int argc, char **argv)
 #else /* YAZ_HAVE_ICU */
 
     printf("ICU not available on your system.\n"
-           "Please install libicu36-dev and icu-doc or similar, "
+           "Please install libicu-dev and icu-doc or similar, "
            "re-configure and re-compile\n");
 
 
index 4f943b6..d05ea11 100644 (file)
@@ -7,6 +7,7 @@
 #include <config.h>
 #endif
 
+#include <stdlib.h>
 #include <yaz/options.h>
 #include <yaz/record_conv.h>
 
@@ -30,6 +31,7 @@ int main (int argc, char **argv)
         case 'V':
             break;
         case 0:
+#if YAZ_HAVE_XML2
             if (!p)
             {
                 xmlDocPtr doc = xmlParseFile(arg);
@@ -92,11 +94,19 @@ int main (int argc, char **argv)
                 fclose(f);
             }
             break;
+#else
+            fprintf(stderr, "%s: YAZ not compiled with Libxml2 support\n",
+                prog);
+            usage();
+            break;
+#endif
         default:
             usage();
         }
-    }   
+    }
+#if YAZ_HAVE_XML2
     yaz_record_conv_destroy(p);
+#endif
     if (no_errors)
         exit(1);
     exit(0);
index cebd865..f576a01 100644 (file)
@@ -45,14 +45,23 @@ all: dirs generate dll sc_test client ztest yazicu zoomsh utilprog testprog icon
 NSIS="c:\program files\nsis\makensis.exe"
 HHC="c:\program files\html help workshop\hhc.exe"
 
-dist: yaz.nsi
+dist: yaz.win32.nsi yaz.nsi distclean
+       nmake DEBUG=0
+       $(NSIS) yaz.win32.nsi
+
+dist64: yaz.win64.nsi yaz.nsi distclean
+       nmake DEBUG=0 HAVE_LIBXSLT=0 HAVE_LIBXML2=0 HAVE_ICONV=0 HAVE_ICU=0
+       $(NSIS) yaz.win64.nsi
+
+distclean:
        nmake DEBUG=1 clean
        nmake DEBUG=0 clean
-       nmake DEBUG=0
-       $(NSIS) yaz.nsi
 
-nsis: all yaz.nsi
-       $(NSIS) yaz.nsi
+nsis: all yaz32.nsi
+       $(NSIS) yaz.win32.nsi
+
+nsis64: yaz.win64.nsi
+       $(NSIS) yaz.win64.nsi
 
 nsishelp:
        $(NSIS)
@@ -471,6 +480,7 @@ MISC_OBJS= \
    $(OBJDIR)\zgdu.obj \
    $(OBJDIR)\soap.obj \
    $(OBJDIR)\solr.obj \
+   $(OBJDIR)\solrtransform.obj \
    $(OBJDIR)\srw.obj \
    $(OBJDIR)\srwutil.obj \
    $(OBJDIR)\zoom-c.obj \
@@ -479,7 +489,7 @@ MISC_OBJS= \
    $(OBJDIR)\zoom-z3950.obj \
    $(OBJDIR)\zoom-sru.obj \
    $(OBJDIR)\zoom-query.obj \
-   $(OBJDIR)\record-render.obj \
+   $(OBJDIR)\record_render.obj \
    $(OBJDIR)\facet.obj \
    $(OBJDIR)\zoom-opt.obj \
    $(OBJDIR)\zoom-socket.obj \
@@ -494,6 +504,7 @@ MISC_OBJS= \
    $(OBJDIR)\cqlutil.obj \
    $(OBJDIR)\cqlstrer.obj \
    $(OBJDIR)\rpn2cql.obj \
+   $(OBJDIR)\rpn2solr.obj \
    $(OBJDIR)\xcqlutil.obj \
    $(OBJDIR)\elementset.obj \
    $(OBJDIR)\timing.obj \
index d92440c..4a1c682 100644 (file)
@@ -18,8 +18,8 @@
 ;!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"
 
 ; 4: VS 2008
-!define VS_RUNTIME_DLL      "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvc*90.dll"
-!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
+;!define VS_RUNTIME_DLL      "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvc*90.dll"
+;!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
 
 
 !include "MUI.nsh"
@@ -104,12 +104,7 @@ Noservice:
        SetOutPath $INSTDIR\bin
        File "${VS_RUNTIME_DLL}"
        File "${VS_RUNTIME_MANIFEST}"
-       File ..\bin\iconv.dll
-       File ..\bin\zlib1.dll
-       File ..\bin\libxml2.dll
-       File ..\bin\libxslt.dll
-       File ..\bin\icu*.dll
-       File ..\bin\yaz*.dll
+       File ..\bin\*.dll
        File ..\bin\*.exe
        SetOutPath $SMPROGRAMS\YAZ
        CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \
@@ -134,12 +129,12 @@ SectionEnd
 Section "YAZ Documentation" YAZ_Documentation
        SectionIn 1 2
        SetOutPath $INSTDIR\doc
-       File /r ..\doc\*.css
-       File /r ..\doc\*.ent
-       File /r ..\doc\*.html
+       File /nonfatal /r ..\doc\*.css
+       File /nonfatal /r ..\doc\*.ent
+       File /nonfatal /r ..\doc\*.html
        File /r ..\doc\*.xml
        File /r ..\doc\*.png
-       File /r ..\doc\*.xsl
+       File /nonfatal /r ..\doc\*.xsl
        SetOutPath $SMPROGRAMS\YAZ
        CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \
                  "$INSTDIR\doc\index.html"
diff --git a/win/yaz.win32.nsi b/win/yaz.win32.nsi
new file mode 100644 (file)
index 0000000..dfa475c
--- /dev/null
@@ -0,0 +1,6 @@
+; YAZ for Windows 32 bit, VS 2008
+!define VS_RUNTIME_DLL      "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvc*90.dll"
+!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
+
+!include yaz.nsi
+
diff --git a/win/yaz.win64.nsi b/win/yaz.win64.nsi
new file mode 100644 (file)
index 0000000..c2be7d4
--- /dev/null
@@ -0,0 +1,6 @@
+; YAZ for Windows 64 bit, VS 2008
+!define VS_RUNTIME_DLL      "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\amd64\Microsoft.VC90.CRT\msvc*90.dll"
+!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\amd64\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
+
+!include yaz.nsi
+
index 3420e35..2074827 100644 (file)
@@ -2,20 +2,20 @@
 # This file is part of the YAZ toolkit.
 # Copyright (C) 1995-2008 Index Data
 
-yazprefix=@prefix@
-yaz_echo_cflags=no
-yaz_echo_libs=no
-yaz_echo_help=no
-yaz_echo_source=yes
-yaz_echo_lalibs=no
-yaz_echo_comp=no
-yaz_src_root=@YAZ_SRC_ROOT@
-yaz_build_root=@YAZ_BUILD_ROOT@
+prefix=@prefix@
+echo_cflags=no
+echo_libs=no
+echo_help=no
+echo_source=yes
+echo_lalibs=no
+echo_comp=no
+src_root=@abs_top_srcdir@
+build_root=@abs_top_builddir@
 ICU_LIBS="@ICU_LIBS@"
 ICU_CPPFLAGS="@ICU_CPPFLAGS@"
 SSL_LIBS="@SSL_LIBS@"
 LIBS="@LIBS@"
-YAZVERSION=@VERSION@
+VERSION=@VERSION@
 VERSION_SHA1=@VERSION_SHA1@
 
 usage()
@@ -44,31 +44,31 @@ while test $# -gt 0; do
     
     case $1 in
        --prefix=*)
-           yazprefix=$optarg
+           prefix=$optarg
            ;;
        --prefix)
-           echo $yazprefix
+           echo $prefix
            exit 0
            ;;
         -V)
-           echo "$YAZVERSION $VERSION_SHA1"
+           echo "$VERSION $VERSION_SHA1"
            exit 0
             ;;
        --version)
-           echo $YAZVERSION
+           echo $VERSION
            exit 0
            ;;
        --cflags)
-           yaz_echo_cflags=yes
+           echo_cflags=yes
            ;;
        --libs)
-           yaz_echo_libs=yes
+           echo_libs=yes
            ;;
        --lalibs)
-           yaz_echo_lalibs=yes
+           echo_lalibs=yes
            ;;
        --comp)
-           yaz_echo_comp=yes
+           echo_comp=yes
            ;;
        threads)
            lib_thread=yes
@@ -89,7 +89,7 @@ while test $# -gt 0; do
            lib_static=yes
            ;;
        -*)
-           yaz_echo_help=yes
+           echo_help=yes
            ;;
     esac
     shift
@@ -110,47 +110,47 @@ fi
 
 YAZINC="@YAZ_CONFIG_CFLAGS@"
 
-if test "$yaz_echo_source" = "yes"; then
-    YAZBIN=${yaz_build_root}/bin
+if test "$echo_source" = "yes"; then
+    YAZBIN=${build_root}/bin
 
     if test "$lib_static" = "yes"; then
         if test "$lib_ssl" != "yes"; then
             LIBS="${SSL_LIBS} $LIBS"
         fi
-        YAZLIB="${yaz_build_root}/src/.libs/libyaz.a"
+        YAZLIB="${build_root}/src/.libs/libyaz.a"
         if test "$lib_server" = "yes"; then
-           YAZLIB="${yaz_build_root}/src/.libs/libyaz_server.a $YAZLIB"
+           YAZLIB="${build_root}/src/.libs/libyaz_server.a $YAZLIB"
         fi
         if test "$lib_icu" = "yes"; then
-           YAZLIB="${yaz_build_root}/src/.libs/libyaz_icu.a $YAZLIB"
+           YAZLIB="${build_root}/src/.libs/libyaz_icu.a $YAZLIB"
         fi
     else
-        YAZLIB="-L${yaz_build_root}/src/.libs $YAZLIB"
+        YAZLIB="-L${build_root}/src/.libs $YAZLIB"
     fi
     YAZLIB="$YAZLIB $LIBS"
 
-    YAZLALIB="${yaz_build_root}/src/libyaz.la"
+    YAZLALIB="${build_root}/src/libyaz.la"
     if test "$lib_server" = "yes"; then
-       YAZLALIB="${yaz_build_root}/src/libyaz_server.la $YAZLALIB"
+       YAZLALIB="${build_root}/src/libyaz_server.la $YAZLALIB"
     fi
     if test "$lib_icu" = "yes"; then
-       YAZLALIB="${yaz_build_root}/src/libyaz_icu.la $YAZLALIB"
+       YAZLALIB="${build_root}/src/libyaz_icu.la $YAZLALIB"
     fi
     YAZLALIB="$YAZLALIB $LIBS"
 
-    YAZINC="-I${yaz_src_root}/include $YAZINC"
-    YAZCOMP=${yaz_src_root}/util/yaz-asncomp
+    YAZINC="-I${src_root}/include $YAZINC"
+    YAZCOMP=${src_root}/util/yaz-asncomp
 else
-    YAZBIN=${yazprefix}/bin
-    YAZCOMP=${yazprefix}/bin/yaz-asncomp
+    YAZBIN=${prefix}/bin
+    YAZCOMP=${prefix}/bin/yaz-asncomp
 
-    if test "$yazprefix" != "/usr"; then
-       YAZLIB="-L$yazprefix/lib $YAZLIB"
+    if test "$prefix" != "/usr"; then
+       YAZLIB="-L$prefix/lib $YAZLIB"
     fi
     YAZLIB="$YAZLIB $LIBS"
     YAZLALIB=$YAZLIB
-    if test "$yazprefix" != "/usr"; then
-       YAZINC="-I$yazprefix/include $YAZINC"
+    if test "$prefix" != "/usr"; then
+       YAZINC="-I$prefix/include $YAZINC"
     fi
 fi
 
@@ -164,19 +164,19 @@ if test "$lib_icu" = "yes"; then
     YAZLALIB="$YAZLALIB $ICU_LIBS"
 fi
 
-if test "$yaz_echo_help" = "yes"; then
+if test "$echo_help" = "yes"; then
     usage 1 1>&2
 fi
-if test "$yaz_echo_cflags" = "yes"; then
+if test "$echo_cflags" = "yes"; then
     echo $YAZINC
 fi
-if test "$yaz_echo_libs" = "yes"; then
+if test "$echo_libs" = "yes"; then
     echo $YAZLIB
 fi
-if test "$yaz_echo_lalibs" = "yes"; then
+if test "$echo_lalibs" = "yes"; then
     echo $YAZLALIB
 fi
-if test "$yaz_echo_comp" = "yes"; then
+if test "$echo_comp" = "yes"; then
     echo $YAZCOMP
 fi
 # Local Variables:
index 645e05c..d6af14a 100644 (file)
@@ -2,7 +2,7 @@ Summary: Z39.50 Programs
 Name: yaz
 Version: @VERSION@
 Release: 1
-Requires: libxslt gnutls readline libyaz4 = %{version}
+Requires: libxslt, gnutls, readline, libyaz4 = %{version}
 License: BSD
 Group: Applications/Internet
 Vendor: Index Data ApS <info@indexdata.dk>
@@ -13,7 +13,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
 # Fedora requires tcp_wrappers-devel .
 %define TCPWRAPPER tcp_wrappers
 %endif
-BuildRequires: pkgconfig libxml2-devel libxslt-devel gnutls-devel readline-devel libicu-devel %{TCPWRAPPER}
+BuildRequires: pkgconfig, libxml2-devel, libxslt-devel, gnutls-devel, readline-devel, libicu-devel, %{TCPWRAPPER}
 Packager: Adam Dickmeiss <adam@indexdata.dk>
 URL: http://www.indexdata.com/yaz
 
@@ -24,7 +24,7 @@ for the ANSI/NISO Z39.50 protocol for Information Retrieval.
 %package -n libyaz4
 Summary: Z39.50 Library
 Group: Libraries
-Requires: libxslt gnutls libicu
+Requires: libxslt, gnutls, libicu
 
 %description -n libyaz4
 YAZ is a library for the ANSI/NISO Z39.50 protocol for Information
@@ -36,7 +36,7 @@ Retrieval.
 %package -n libyaz4-devel
 Summary: Z39.50 Library - development package
 Group: Development/Libraries
-Requires: libyaz4 = %{version} libxml2-devel libxslt-devel libicu-devel
+Requires: libyaz4 = %{version}, libxml2-devel, libxslt-devel, libicu-devel
 Conflicts: libyaz-devel
 
 %description -n libyaz4-devel
@@ -45,7 +45,7 @@ Development libraries and includes for the libyaz package.
 %package -n yaz-illclient
 Summary: ILL client
 Group: Applications/Communication
-Requires: readline libyaz4 = %{version}
+Requires: readline, libyaz4 = %{version}
 
 %description -n yaz-illclient
 yaz-illclient: an ISO ILL client.
@@ -111,7 +111,7 @@ rm -fr ${RPM_BUILD_ROOT}
 %{_datadir}/aclocal/yaz.m4
 %{_mandir}/man1/yaz-asncomp.*
 %{_mandir}/man7/yaz.*
-%{_mandir}/man8/yaz-config.*
+%{_mandir}/man?/yaz-config.*
 %{_datadir}/doc/yaz
 %{_datadir}/yaz
 
index 8469ce4..d32d01f 100644 (file)
 
 #define MAX_CON 100
 
+static void process_events(ZOOM_connection *c)
+{
+    int i;
+
+    printf("process_events\n");
+    while ((i = ZOOM_event(MAX_CON, c)) != 0)
+    {
+        int peek = ZOOM_connection_peek_event(c[i-1]);
+        int event = ZOOM_connection_last_event(c[i-1]);
+        printf ("no = %d peek = %d event = %d %s\n", i-1,
+                peek,
+                event,
+                ZOOM_get_event_str(event));
+    }
+}
+
 static int next_token(const char **cpp, const char **t_start)
 {
     int len = 0;
@@ -249,8 +265,7 @@ static void cmd_show(ZOOM_connection *c, ZOOM_resultset *r,
 
     for (i = 0; i < MAX_CON; i++)
         ZOOM_resultset_records(r[i], 0, start, count);
-    while (ZOOM_event(MAX_CON, c))
-        ;
+    process_events(c);
 
     for (i = 0; i < MAX_CON; i++)
     {
@@ -318,14 +333,7 @@ static void cmd_facets(ZOOM_connection *c, ZOOM_resultset *r,
     if (render_str)
         type = wrbuf_cstr(render_str);
 
-    /*
-    for (i = 0; i < MAX_CON; i++) {
-        int num_facets = ZOOM_resultset_facet_size(r[i]);
-        ZOOM_resultset_records(r[i], 0, start, count);
-    }
-    */
-    while (ZOOM_event(MAX_CON, c))
-        ;
+    process_events(c);
 
     for (i = 0; i < MAX_CON; i++)
     {
@@ -371,8 +379,7 @@ static void cmd_ext(ZOOM_connection *c, ZOOM_resultset *r,
             p[i] = 0;
     }
 
-    while (ZOOM_event(MAX_CON, c))
-        ;
+    process_events(c);
 
     for (i = 0; i<MAX_CON; i++)
     {
@@ -442,8 +449,7 @@ static void cmd_search(ZOOM_connection *c, ZOOM_resultset *r,
     }
     ZOOM_query_destroy(s);
 
-    while (ZOOM_event(MAX_CON, c))
-        ;
+    process_events(c);
 
     for (i = 0; i<MAX_CON; i++)
     {
@@ -501,8 +507,8 @@ static void cmd_scan(ZOOM_connection *c, ZOOM_resultset *r,
     }
     ZOOM_query_destroy(query);
 
-    while (ZOOM_event(MAX_CON, c))
-        ;
+    process_events(c);
+
     for (i = 0; i<MAX_CON; i++)
     {
         int error;
@@ -545,8 +551,7 @@ static void cmd_sort(ZOOM_connection *c, ZOOM_resultset *r,
         if (r[i])
             ZOOM_resultset_sort(r[i], "yaz", sort_spec);
     }
-    while (ZOOM_event(MAX_CON, c))
-        ;
+    process_events(c);
 }
 
 static void cmd_help(ZOOM_connection *c, ZOOM_resultset *r,
index 52ee5a3..769df73 100644 (file)
@@ -66,9 +66,11 @@ int main(int argc, char **argv)
     while ((i = ZOOM_event (no, z)))
     {
         int peek = ZOOM_connection_peek_event(z[i-1]);
-        printf ("no = %d peek = %d event = %d\n", i-1,
+       int event = ZOOM_connection_last_event(z[i-1]);
+        printf ("no = %d peek = %d event = %d %s\n", i-1,
                 peek,
-                ZOOM_connection_last_event(z[i-1]));
+               event,
+               ZOOM_get_event_str(event));
     }
     
     /* no more to be done. Inspect results */
index c4e7b49..2ef8921 100644 (file)
@@ -210,8 +210,8 @@ static void ztest_sleep(double d)
     Sleep( (DWORD) (d * 1000));
 #else
     struct timeval tv;
-    tv.tv_sec = floor(d);
-    tv.tv_usec = (d - floor(d)) * 1000000;
+    tv.tv_sec = d;
+    tv.tv_usec = (d - (long) d) * 1000000;
     select(0, 0, 0, 0, &tv);
 #endif
 }